Skip to content

Commit 90dea0c

Browse files
authored
Merge pull request #1414 from IgniteUI/dmdimitrov/dock-manager-split-panes-fixed-size
docs(dock-manager): add split panes fixed size section
2 parents 63b4d22 + 86f81d6 commit 90dea0c

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

doc/en/components/layouts/dock-manager-customization.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,60 @@ Try it in the example below:
9898

9999
`sample="/layouts/dock-manager/contained-in-boundaries", height="600", alt="{Platform} Dock Manager Contained in Boundaries Example"`
100100

101+
## Split Panes Fixed Size Mode
102+
103+
By default, the size of a pane is relative to the sizes of its sibling panes and defaults to 100. If you have two sibling panes, where the first one has its size set to 400 and the second one - to 200, the first will be twice the size of the second one and these two panes would fill up all the available space.
104+
105+
If, for certain panes, you want to specify their sizes in pixels, instead of relying on the relative distribution of all the available space, you should set the `useFixedSize` of the parent split pane. When this property is set to **true** all children are sized in pixels, based on their `size` property. With that modification, the first pane will span across 400 pixels and the second one - 200 pixels. Further resizing via the splitter would change only the size of the current content pane without affecting the sizes of its siblings. Once the sum of the child panes' sizes exceeds their parent's size, a scrollbar will appear making the parent split pane scrollable.
106+
107+
108+
```ts
109+
const splitPaneRelativeSize: IgcSplitPane = {
110+
type: IgcDockManagerPaneType.splitPane,
111+
orientation: IgcSplitPaneOrientation.horizontal,
112+
panes: [
113+
{
114+
type: IgcDockManagerPaneType.contentPane,
115+
contentId: 'content1',
116+
header: 'Pane 1',
117+
size: 400 // Size will be relative to siblings
118+
},
119+
{
120+
type: IgcDockManagerPaneType.contentPane,
121+
contentId: 'content2',
122+
header: 'Pane 2',
123+
size: 200 // Size will be relative to siblings
124+
}
125+
]
126+
}
127+
128+
const splitPaneFixedSize: IgcSplitPane = {
129+
type: IgcDockManagerPaneType.splitPane,
130+
orientation: IgcSplitPaneOrientation.horizontal,
131+
useFixedSize: true,
132+
panes: [
133+
{
134+
type: IgcDockManagerPaneType.contentPane,
135+
contentId: 'content3',
136+
header: 'Pane 3',
137+
size: 400 // Size will be applied in pixels
138+
},
139+
{
140+
type: IgcDockManagerPaneType.contentPane,
141+
contentId: 'content4',
142+
header: 'Pane 4',
143+
size: 200 // Size will be applied in pixels
144+
}
145+
]
146+
}
147+
```
148+
149+
Please note that when you dock a pane inside a split pane that has `useFixedSize` set to **true** the docked pane will then have the same width/height (depending on the split pane orientation) as the floating pane.
150+
151+
Try it for yourself in the sample below:
152+
153+
`sample="/layouts/dock-manager/split-pane-fixed-size", height="600", alt="{Platform} Dock Manager Split Pane Fixed Size Example"`
154+
101155
## API References
102156

103157
- `DockManager`

doc/en/components/layouts/dock-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The Dock Manager defines several pane types:
8888
* `TabGroupPane`
8989
* `DocumentHost`
9090

91-
Each type of pane has a `Size` property. Depending on the parent orientation the size may affect either the width or the height of the pane. The size of a pane is relative to the sizes of its sibling panes and defaults to 100. If you have two sibling panes, where the first one has size set to 200 and the second one - size set to 100, the first will be twice the size of the second one. If the absolute size of their parent is 900px, they will be sized to 600px and 300px respectively.
91+
Each type of pane has a `Size` property. Depending on the parent orientation the size may affect either the width or the height of the pane. By default, the size of a pane is relative to the sizes of its sibling panes and defaults to 100. If you have two sibling panes, where the first one has its size set to 200 and the second one - size set to 100, the first will be twice the size of the second one and these two panes would fill up all the available space. If the absolute size of their parent is 900px, they will be sized to 600px and 300px respectively. If, for certain panes, you want to specify their sizes in pixels, instead of relying on the relative distribution of all the available space, you should set the `useFixedSize` of the parent split pane. For more information on this refer to [Split Panes Fixed Size Mode](dock-manager-customization.md#split-panes-fixed-size-mode) topic.
9292

9393
The end-user can perform the following actions to customize the layout at runtime:
9494
* Pin/unpin a pane

docfx/en/components/toc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,8 @@
15111511
{
15121512
"exclude": ["Angular", "React", "Blazor"],
15131513
"name": "Customization",
1514-
"href": "layouts/dock-manager-customization.md"
1514+
"href": "layouts/dock-manager-customization.md",
1515+
"status": "UPDATED"
15151516
}
15161517
]
15171518
},

0 commit comments

Comments
 (0)