Resizing
Resizing
height | The panel height in pixels
|
---|---|
onDidDimensionsChange |
|
width | The panel width in pixels
|
height | The panel height in pixels
|
onDidDimensionsChange |
|
width | The panel width in pixels
|
setSize |
|
height | The panel height in pixels
|
onDidDimensionsChange |
|
width | The panel width in pixels
|
setSize |
|
Panel Resizing
Each Dockview contains of a number of groups and each group has a number of panels. Logically a user may want to resize a panel, but this translates to resizing the group which contains that panel.
You can set the size of a panel using props.api.setSize(...)
.
You can also set the size of the group associated with the panel using props.api.group.api.setSize(...)
although this isn't recommended
due to the clunky syntax.
// it's mandatory to provide either a height or a width, providing both is optional
props.api.setSize({
height: 100,
width: 200,
});
// you could also resize the panels group, although not recommended it achieved the same result
props.api.group.api.setSize({
height: 100,
width: 200,
});
You can see an example invoking both approaches below.