BlockSuite API Documentation / @blocksuite/blocks / EdgelessToolController
Class: abstract
EdgelessToolController<Tool>
Extended by
Type parameters
• Tool extends EdgelessTool
= EdgelessTool
Constructors
new EdgelessToolController()
new EdgelessToolController<
Tool
>(service
):EdgelessToolController
<Tool
>
Parameters
• service: EdgelessRootService
Returns
EdgelessToolController
<Tool
>
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:38
Properties
_draggingArea
protected
_draggingArea:null
|SelectionArea
=null
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:30
_edgeless
protected
_edgeless:EdgelessRootBlockComponent
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:28
_service
protected
_service:EdgelessRootService
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:32
enableHover
enableHover:
boolean
=false
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:34
tool
abstract
tool:Tool
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:36
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
draggingArea
get
draggingArea():null
|SelectionArea
Returns
null
| SelectionArea
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:12
Methods
afterModeSwitch()
abstract
afterModeSwitch(newMode
):void
Parameters
• newMode: Tool
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:56
beforeModeSwitch()
abstract
beforeModeSwitch(prevMode
):void
Parameters
• prevMode: Tool
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:55
mount()
mount(
edgeless
):void
Parameters
• edgeless: EdgelessRootBlockComponent
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:42
onContainerClick()
abstract
onContainerClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:49
onContainerContextMenu()
abstract
onContainerContextMenu(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:54
onContainerDblClick()
abstract
onContainerDblClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:50
onContainerDragEnd()
abstract
onContainerDragEnd(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:48
onContainerDragMove()
abstract
onContainerDragMove(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:47
onContainerDragStart()
abstract
onContainerDragStart(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:46
onContainerMouseMove()
abstract
onContainerMouseMove(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:52
onContainerMouseOut()
abstract
onContainerMouseOut(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:53
onContainerPointerDown()
abstract
onContainerPointerDown(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:45
onContainerTripleClick()
abstract
onContainerTripleClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:51
onPressShiftKey()
abstract
onPressShiftKey(pressed
):void
Parameters
• pressed: boolean
Returns
void
Warning
Check !ev.repeat
before calling this function in KeyboardEvents where needed
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:61
onPressSpaceBar()
abstract
onPressSpaceBar(pressed
):void
Parameters
• pressed: boolean
Returns
void
Warning
Check !ev.repeat
before calling this function in KeyboardEvents where needed
Source
packages/blocks/src/root-block/edgeless/controllers/tools/edgeless-tool.ts:66