mirror of
				https://github.com/mathuo/dockview
				synced 2025-11-03 21:57:17 +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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user