Files
AFFiNE-Mirror/blocksuite/docs/api/@blocksuite/block-std/gfx/classes/GfxSelectionManager.md
doouding ace5d44a61 refactor: rewrite dblclick and selection logic of default-tool (#11036)
continue #10824

### Changed
- Moved double-click-to-edit behavior from the default tool to individual model views
- Introduced `onSelected` callback interface in gfx view components to allows developers to override default selection logic
2025-03-26 07:32:43 +00:00

882 B

BlockSuite API Documentation


BlockSuite API Documentation / @blocksuite/block-std / gfx / 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