Skip to content

BlockSuite API Documentation / @blocksuite/blocks / CopilotSelectionController

Class: CopilotSelectionController

Extends

Constructors

new CopilotSelectionController()

new CopilotSelectionController(service): CopilotSelectionController

Parameters

service: EdgelessRootService

Returns

CopilotSelectionController

Inherited from

EdgelessToolController.constructor

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:38

Properties

_draggingArea

protected _draggingArea: null | SelectionArea = null

Inherited from

EdgelessToolController._draggingArea

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:12


_edgeless

protected _edgeless: EdgelessRootBlockComponent

Inherited from

EdgelessToolController._edgeless

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:14


_service

protected _service: EdgelessRootService

Inherited from

EdgelessToolController._service

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:16


draggingAreaUpdated

draggingAreaUpdated: Slot<boolean | void>

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:21


dragLastPoint

dragLastPoint: [number, number]

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:23


dragStartPoint

dragStartPoint: [number, number]

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:25


enableHover

enableHover: boolean = false

Inherited from

EdgelessToolController.enableHover

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:18


tool

readonly tool: CopilotSelectionTool

Overrides

EdgelessToolController.tool

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:27

Accessors

_blocks

get protected _blocks(): EdgelessBlockModel<GfxCompatibleProps>[]

Returns

EdgelessBlockModel<GfxCompatibleProps>[]

Inherited from

EdgelessToolController._blocks

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:22


_doc

get protected _doc(): Doc

Returns

Doc

Inherited from

EdgelessToolController._doc

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:26


_surface

get protected _surface(): SurfaceBlockComponent

Returns

SurfaceBlockComponent

Inherited from

EdgelessToolController._surface

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:30


area

get area(): DOMRect

Returns

DOMRect

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:31


draggingArea

get draggingArea(): null | SelectionArea

Returns

null | SelectionArea

Inherited from

EdgelessToolController.draggingArea

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:34


processing

get processing(): boolean

Returns

boolean

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:44


selectedElements

get selectedElements(): GfxModel[]

Returns

GfxModel[]

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:52


selection

get selection(): EdgelessSelectionManager

Returns

EdgelessSelectionManager

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:56

Methods

abort()

abort(): void

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:65


afterModeSwitch()

afterModeSwitch(): void

Returns

void

Overrides

EdgelessToolController.afterModeSwitch

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:72


beforeModeSwitch()

beforeModeSwitch(edgelessTool?): void

Parameters

edgelessTool?: TextTool | BrushTool | ConnectorTool | ShapeTool | MindmapTool | DefaultTool | CopilotSelectionTool | EraserTool | FrameNavigatorTool | FrameTool | LassoTool | NoteTool | PanTool | object

Returns

void

Overrides

EdgelessToolController.beforeModeSwitch

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:74


mount()

mount(edgeless): void

Parameters

edgeless: EdgelessRootBlockComponent

Returns

void

Inherited from

EdgelessToolController.mount

Defined in

packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:44


onContainerClick()

onContainerClick(): void

Returns

void

Overrides

EdgelessToolController.onContainerClick

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:78


onContainerContextMenu()

onContainerContextMenu(): void

Returns

void

Overrides

EdgelessToolController.onContainerContextMenu

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:80


onContainerDblClick()

onContainerDblClick(): void

Returns

void

Overrides

EdgelessToolController.onContainerDblClick

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:82


onContainerDragEnd()

onContainerDragEnd(): void

Returns

void

Overrides

EdgelessToolController.onContainerDragEnd

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:84


onContainerDragMove()

onContainerDragMove(e): void

Parameters

e: PointerEventState

Returns

void

Overrides

EdgelessToolController.onContainerDragMove

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:91


onContainerDragStart()

onContainerDragStart(e): void

Parameters

e: PointerEventState

Returns

void

Overrides

EdgelessToolController.onContainerDragStart

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:114


onContainerMouseMove()

onContainerMouseMove(): void

Returns

void

Overrides

EdgelessToolController.onContainerMouseMove

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:122


onContainerMouseOut()

onContainerMouseOut(): void

Returns

void

Overrides

EdgelessToolController.onContainerMouseOut

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:124


onContainerPointerDown()

onContainerPointerDown(e): void

Parameters

e: PointerEventState

Returns

void

Overrides

EdgelessToolController.onContainerPointerDown

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:126


onContainerTripleClick()

onContainerTripleClick(): void

Returns

void

Overrides

EdgelessToolController.onContainerTripleClick

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:135


onPressShiftKey()

onPressShiftKey(): void

Returns

void

Warning

Check !ev.repeat before calling this function in KeyboardEvents where needed

Overrides

EdgelessToolController.onPressShiftKey

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:137


onPressSpaceBar()

onPressSpaceBar(): void

Returns

void

Warning

Check !ev.repeat before calling this function in KeyboardEvents where needed

Overrides

EdgelessToolController.onPressSpaceBar

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:139


updateDragPointsWith()

updateDragPointsWith(selectedElements, padding): void

Parameters

selectedElements: GfxModel[]

padding: number = 0

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:141


updateSelectionWith()

updateSelectionWith(selectedElements, padding): void

Parameters

selectedElements: GfxModel[]

padding: number = 0

Returns

void

Defined in

packages/blocks/src/root-block/edgeless/tools/copilot-tool.ts:153