BlockSuite API Documentation / @blocksuite/block-std / UIEventDispatcher
Class: UIEventDispatcher
Constructors
new UIEventDispatcher(std)
new UIEventDispatcher(
std
):UIEventDispatcher
Parameters
• std: BlockStdScope
Returns
Source
packages/framework/block-std/src/event/dispatcher.ts:100
Properties
_active
private
_active:boolean
=false
Source
packages/framework/block-std/src/event/dispatcher.ts:95
_clipboardControl
private
_clipboardControl:ClipboardControl
Source
packages/framework/block-std/src/event/dispatcher.ts:93
_handlersMap
private
_handlersMap:Record
<"click"
|"doubleClick"
|"tripleClick"
|"pointerDown"
|"pointerMove"
|"pointerUp"
|"pointerOut"
|"dragStart"
|"dragMove"
|"dragEnd"
|"keyDown"
|"keyUp"
|"selectionChange"
|"compositionStart"
|"compositionUpdate"
|"compositionEnd"
|"cut"
|"copy"
|"paste"
|"beforeInput"
|"blur"
|"focus"
|"drop"
|"contextMenu"
|"wheel"
,EventHandlerRunner
[]>
Source
packages/framework/block-std/src/event/dispatcher.ts:86
_keyboardControl
private
_keyboardControl:KeyboardControl
Source
packages/framework/block-std/src/event/dispatcher.ts:91
_pointerControl
private
_pointerControl:PointerControl
Source
packages/framework/block-std/src/event/dispatcher.ts:90
_rangeControl
private
_rangeControl:RangeControl
Source
packages/framework/block-std/src/event/dispatcher.ts:92
disposables
disposables:
DisposableGroup
Source
packages/framework/block-std/src/event/dispatcher.ts:74
slots
slots:
object
Deprecated
This property is deprecated and will be removed in the future.
editorHostPanned
editorHostPanned:
Slot
<void
>
parentScaleChanged
parentScaleChanged:
Slot
<number
>
Source
packages/framework/block-std/src/event/dispatcher.ts:81
std
std:
BlockStdScope
Source
packages/framework/block-std/src/event/dispatcher.ts:100
Accessors
_currentSelections
get
private
_currentSelections():BaseSelection
[]
Returns
Source
packages/framework/block-std/src/event/dispatcher.ts:169
active
get
active():boolean
Returns
boolean
Source
packages/framework/block-std/src/event/dispatcher.ts:96
cumulativeParentScale
get
cumulativeParentScale():number
Deprecated
This method is deprecated and will be removed in the future.
Returns
number
Source
packages/framework/block-std/src/event/dispatcher.ts:111
host
get
host():HTMLElement
Returns
HTMLElement
Source
packages/framework/block-std/src/event/dispatcher.ts:126
Methods
_bindEvents()
private
_bindEvents():void
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:280
_buildEventScopeBySelection()
private
_buildEventScopeBySelection(name
):undefined
|EventScope
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
Returns
undefined
| EventScope
Source
packages/framework/block-std/src/event/dispatcher.ts:253
_buildEventScopeByTarget()
private
_buildEventScopeByTarget(name
,target
):undefined
|EventScope
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• target: Node
Returns
undefined
| EventScope
Source
packages/framework/block-std/src/event/dispatcher.ts:228
_getEventScope()
private
_getEventScope(name
,state
):undefined
|EventScope
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• state: EventSourceState
Returns
undefined
| EventScope
Source
packages/framework/block-std/src/event/dispatcher.ts:173
add()
add(
name
,handler
,options
?): () =>void
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• handler: UIEventHandler
• options?: EventOptions
Returns
Function
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:150
bindHotkey()
bindHotkey(...
args
): () =>void
Parameters
• ...args: [Record
<string
, UIEventHandler
>, EventOptions
]
Returns
Function
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:166
buildEventScope()
buildEventScope(
name
,flavours
,paths
):undefined
|EventScope
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• flavours: string
[]
• paths: string
[][]
Returns
undefined
| EventScope
Source
packages/framework/block-std/src/event/dispatcher.ts:199
mount()
mount():
void
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:115
run()
run(
name
,context
,scope
?):void
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• context: UIEventStateContext
• scope?: EventScope
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:130
unmount()
unmount():
void
Returns
void
Source
packages/framework/block-std/src/event/dispatcher.ts:122