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
>
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:38
Properties
_draggingArea
protected
_draggingArea:null
|SelectionArea
=null
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:12
_edgeless
protected
_edgeless:EdgelessRootBlockComponent
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:14
_service
protected
_service:EdgelessRootService
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:16
enableHover
enableHover:
boolean
=false
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:18
tool
abstract
tool:Tool
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:20
Accessors
_blocks
get
protected
_blocks():EdgelessBlockModel
<GfxCompatibleProps
>[]
Returns
EdgelessBlockModel
<GfxCompatibleProps
>[]
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:22
_doc
get
protected
_doc():Doc
Returns
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:26
_surface
get
protected
_surface():SurfaceBlockComponent
Returns
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:30
draggingArea
get
draggingArea():null
|SelectionArea
Returns
null
| SelectionArea
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:34
Methods
afterModeSwitch()
abstract
afterModeSwitch(newMode
):void
Parameters
• newMode: Tool
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:42
beforeModeSwitch()
abstract
beforeModeSwitch(prevMode
):void
Parameters
• prevMode: Tool
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:43
mount()
mount(
edgeless
):void
Parameters
• edgeless: EdgelessRootBlockComponent
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:44
onContainerClick()
abstract
onContainerClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:47
onContainerContextMenu()
abstract
onContainerContextMenu(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:48
onContainerDblClick()
abstract
onContainerDblClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:49
onContainerDragEnd()
abstract
onContainerDragEnd(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:50
onContainerDragMove()
abstract
onContainerDragMove(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:51
onContainerDragStart()
abstract
onContainerDragStart(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:52
onContainerMouseMove()
abstract
onContainerMouseMove(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:53
onContainerMouseOut()
abstract
onContainerMouseOut(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:54
onContainerPointerDown()
abstract
onContainerPointerDown(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:55
onContainerTripleClick()
abstract
onContainerTripleClick(e
):void
Parameters
• e: PointerEventState
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:56
onPressShiftKey()
abstract
onPressShiftKey(pressed
):void
Parameters
• pressed: boolean
Returns
void
Warning
Check !ev.repeat
before calling this function in KeyboardEvents where needed
Defined in
packages/blocks/src/root-block/edgeless/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
Defined in
packages/blocks/src/root-block/edgeless/tools/edgeless-tool.ts:66