mirror of
https://github.com/mathuo/dockview
synced 2025-02-02 14:35:46 +00:00
Merge pull request #678 from mathuo/677-floating-panel-documentation-example-not-working
chore: fix documentation
This commit is contained in:
commit
ed3fd57d6a
@ -155,16 +155,24 @@ const panel = api.addPanel({
|
|||||||
|
|
||||||
You should specific the `floating` option which can be either `true` or an object describing the position of the floating group.
|
You should specific the `floating` option which can be either `true` or an object describing the position of the floating group.
|
||||||
|
|
||||||
|
:::info
|
||||||
|
The `position` property of the `floating` object accepts combinations of `top`, `left`, `bottom` and `right`.
|
||||||
|
:::
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
api.addPanel({
|
api.addPanel({
|
||||||
id: 'panel_1',
|
id: 'panel_1',
|
||||||
component: 'default',
|
component: 'default',
|
||||||
floating: true,
|
floating: true
|
||||||
});
|
});
|
||||||
|
|
||||||
api.addPanel({
|
api.addPanel({
|
||||||
id: 'panel_2',
|
id: 'panel_2',
|
||||||
component: 'default',
|
component: 'default',
|
||||||
floating: { left: 10, top: 10, width: 300, height: 300 },
|
floating: {
|
||||||
|
position: { left: 10, top: 10 },
|
||||||
|
width: 300,
|
||||||
|
height: 300
|
||||||
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user