mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
@@ -0,0 +1,68 @@
|
||||
[**BlockSuite API Documentation**](../../../../README.md)
|
||||
|
||||
***
|
||||
|
||||
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/std](../../README.md) / [gfx](../README.md) / GfxSelectionManager
|
||||
|
||||
# Class: GfxSelectionManager
|
||||
|
||||
GfxSelectionManager is just a wrapper of std selection providing
|
||||
convenient method and states in gfx
|
||||
|
||||
## Extends
|
||||
|
||||
- `GfxExtension`
|
||||
|
||||
## Methods
|
||||
|
||||
### has()
|
||||
|
||||
> **has**(`element`): `boolean`
|
||||
|
||||
check if the element is selected in local
|
||||
|
||||
#### Parameters
|
||||
|
||||
##### element
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
***
|
||||
|
||||
### hasRemote()
|
||||
|
||||
> **hasRemote**(`element`): `boolean`
|
||||
|
||||
check if element is selected by remote peers
|
||||
|
||||
#### Parameters
|
||||
|
||||
##### element
|
||||
|
||||
`string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
***
|
||||
|
||||
### toggle()
|
||||
|
||||
> **toggle**(`element`): `void`
|
||||
|
||||
Toggle the selection state of single element
|
||||
|
||||
#### Parameters
|
||||
|
||||
##### element
|
||||
|
||||
`string` | `GfxModel`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
Reference in New Issue
Block a user