mirror of
https://github.com/mathuo/dockview
synced 2025-02-02 06:25:44 +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.
|
||||
|
||||
:::info
|
||||
The `position` property of the `floating` object accepts combinations of `top`, `left`, `bottom` and `right`.
|
||||
:::
|
||||
|
||||
```ts
|
||||
api.addPanel({
|
||||
id: 'panel_1',
|
||||
component: 'default',
|
||||
floating: true,
|
||||
floating: true
|
||||
});
|
||||
|
||||
api.addPanel({
|
||||
id: 'panel_2',
|
||||
component: 'default',
|
||||
floating: { left: 10, top: 10, width: 300, height: 300 },
|
||||
id: 'panel_2',
|
||||
component: 'default',
|
||||
floating: {
|
||||
position: { left: 10, top: 10 },
|
||||
width: 300,
|
||||
height: 300
|
||||
}
|
||||
});
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user