BlockSuite API Documentation / @blocksuite/blocks / CopilotSelectionController
Class: CopilotSelectionController
Extends
EdgelessToolController
<CopilotSelectionTool
>
Constructors
new CopilotSelectionController()
new CopilotSelectionController(
service
):CopilotSelectionController
Parameters
• service: EdgelessRootService
Returns
Inherited from
EdgelessToolController
.constructor
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:38
Properties
_dragging
private
_dragging:boolean
=false
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:17
_draggingArea
protected
_draggingArea:null
|SelectionArea
=null
Inherited from
EdgelessToolController
._draggingArea
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:30
_edgeless
protected
_edgeless:EdgelessRootBlockComponent
Inherited from
EdgelessToolController
._edgeless
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:28
_service
protected
_service:EdgelessRootService
Inherited from
EdgelessToolController
._service
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:32
dragLastPoint
dragLastPoint: [
number
,number
]
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:25
dragStartPoint
dragStartPoint: [
number
,number
]
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:23
draggingAreaUpdated
draggingAreaUpdated:
Slot
<boolean
|void
>
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:27
enableHover
enableHover:
boolean
=false
Inherited from
EdgelessToolController
.enableHover
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:34
tool
readonly
tool:CopilotSelectionTool
Overrides
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:19
Accessors
_blocks
get
protected
_blocks():EdgelessBlockModel
<EdgelessSelectableProps
>[]
Returns
EdgelessBlockModel
<EdgelessSelectableProps
>[]
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:24
_doc
get
protected
_doc():Doc
Returns
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:20
_surface
get
protected
_surface():SurfaceBlockComponent
Returns
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:16
area
get
area():DOMRect
Returns
DOMRect
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:37
draggingArea
get
draggingArea():null
|SelectionArea
Returns
null
| SelectionArea
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:12
processing
get
processing():boolean
Returns
boolean
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:50
selectedElements
get
selectedElements():EdgelessModelType
[]
Returns
EdgelessModelType
[]
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:33
selection
get
selection():EdgelessSelectionManager
Returns
EdgelessSelectionManager
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:29
Methods
_initDragState()
private
_initDragState(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:58
abort()
abort():
void
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:63
afterModeSwitch()
afterModeSwitch():
void
Returns
void
Overrides
EdgelessToolController
.afterModeSwitch
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:168
beforeModeSwitch()
beforeModeSwitch(
edgelessTool
?):void
Parameters
• edgelessTool?: NoteTool
| TextTool
| BrushTool
| ShapeTool
| ConnectorTool
| MindmapTool
| FrameTool
| CopilotSelectionTool
| DefaultTool
| EraserTool
| FrameNavigatorTool
| LassoTool
| PanTool
| object
Returns
void
Overrides
EdgelessToolController
.beforeModeSwitch
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:164
mount()
mount(
edgeless
):void
Parameters
• edgeless: EdgelessRootBlockComponent
Returns
void
Inherited from
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:42
onContainerClick()
onContainerClick():
void
Returns
void
Overrides
EdgelessToolController
.onContainerClick
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:148
onContainerContextMenu()
onContainerContextMenu():
void
Returns
void
Overrides
EdgelessToolController
.onContainerContextMenu
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:150
onContainerDblClick()
onContainerDblClick():
void
Returns
void
Overrides
EdgelessToolController
.onContainerDblClick
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:152
onContainerDragEnd()
onContainerDragEnd():
void
Returns
void
Overrides
EdgelessToolController
.onContainerDragEnd
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:132
onContainerDragMove()
onContainerDragMove(
e
):void
Parameters
• e: PointerEventState
Returns
void
Overrides
EdgelessToolController
.onContainerDragMove
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:109
onContainerDragStart()
onContainerDragStart(
e
):void
Parameters
• e: PointerEventState
Returns
void
Overrides
EdgelessToolController
.onContainerDragStart
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:101
onContainerMouseMove()
onContainerMouseMove():
void
Returns
void
Overrides
EdgelessToolController
.onContainerMouseMove
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:156
onContainerMouseOut()
onContainerMouseOut():
void
Returns
void
Overrides
EdgelessToolController
.onContainerMouseOut
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:158
onContainerPointerDown()
onContainerPointerDown(
e
):void
Parameters
• e: PointerEventState
Returns
void
Overrides
EdgelessToolController
.onContainerPointerDown
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:139
onContainerTripleClick()
onContainerTripleClick():
void
Returns
void
Overrides
EdgelessToolController
.onContainerTripleClick
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:154
onPressShiftKey()
onPressShiftKey():
void
Returns
void
Overrides
EdgelessToolController
.onPressShiftKey
Warning
Check !ev.repeat
before calling this function in KeyboardEvents where needed
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:160
onPressSpaceBar()
onPressSpaceBar():
void
Returns
void
Overrides
EdgelessToolController
.onPressSpaceBar
Warning
Check !ev.repeat
before calling this function in KeyboardEvents where needed
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:162
updateDragPointsWith()
updateDragPointsWith(
selectedElements
,padding
):void
Parameters
• selectedElements: EdgelessModelType
[]
• padding: number
= 0
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:70
updateSelectionWith()
updateSelectionWith(
selectedElements
,padding
):void
Parameters
• selectedElements: EdgelessModelType
[]
• padding: number
= 0
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/copilot-tool.ts:82