Skip to content

size panel are ignored, need fix with Nullish coalescing assignment #266

Description

@jonlepage

if i do this , the size seems not apply

const direction = restoreInfo.restoreDirection ?? 'right';
										panelSource.size = restoreInfo.panelSizeInParent;
										dockLayout.dockMove( panelSource, siblingPanel, direction );

After debug, it seems because you don't check the assignement !?
You should maybe do a Nullish_coalescing_assignment
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment

As you can see here, if i have a panel with size 1, it will be replaced with size of the other panel !
Image

the fix should be :
newPanel.size ??= panel.size;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions