Table of contents

Extends StateNode.

class HandTool extends StateNode {}

Constructor

from StateNode

Constructs a new instance of the StateNode class

Parameters
NameDescription

editor

Editor

parent

StateNode

Properties

children

static children: () => TLStateNodeConstructor[]

id

static id: string

initial

static initial: string

isLockable

static isLockable: boolean



editor

from StateNode
editor: Editor

enter

from StateNode
enter: (info: any, from: string) => void

exit

from StateNode
exit: (info: any, from: string) => void

handleEvent

from StateNode
handleEvent: (info: Exclude<TLEventInfo, TLPinchEventInfo>) => void

onCancel

from StateNode
onCancel?: TLEventHandlers['onCancel']

onComplete

from StateNode
onComplete?: TLEventHandlers['onComplete']

onDoubleClick

onDoubleClick: TLClickEvent

onEnter

from StateNode
onEnter?: TLEnterEventHandler

onExit

from StateNode
onExit?: TLExitEventHandler

onInterrupt

from StateNode
onInterrupt?: TLEventHandlers['onInterrupt']

onKeyDown

from StateNode
onKeyDown?: TLEventHandlers['onKeyDown']

onKeyRepeat

from StateNode
onKeyRepeat?: TLEventHandlers['onKeyRepeat']

onKeyUp

from StateNode
onKeyUp?: TLEventHandlers['onKeyUp']

onLongPress

from StateNode
onLongPress?: TLEventHandlers['onLongPress']

onMiddleClick

from StateNode
onMiddleClick?: TLEventHandlers['onMiddleClick']

onPointerDown

from StateNode
onPointerDown?: TLEventHandlers['onPointerDown']

onPointerMove

from StateNode
onPointerMove?: TLEventHandlers['onPointerMove']

onPointerUp

from StateNode
onPointerUp?: TLEventHandlers['onPointerUp']

onQuadrupleClick

onQuadrupleClick: TLClickEvent

onRightClick

from StateNode
onRightClick?: TLEventHandlers['onRightClick']

onTick

from StateNode
onTick?: TLEventHandlers['onTick']

onTripleClick

onTripleClick: TLClickEvent

onWheel

from StateNode
onWheel?: TLEventHandlers['onWheel']

parent

from StateNode
parent: StateNode

performanceTracker

from StateNode
performanceTracker: PerformanceTracker

shapeType

from StateNode
shapeType?: string

transition

from StateNode

Transition to a new active child state node.

transition: (id: string, info?: any) => this
Example
parentState.transition('childStateA')
parentState.transition('childStateB', { myData: 4 })
Parameters
NameDescription

id

The id of the child state node to transition to.

info

Any data to pass to the onEnter and onExit handlers.


type

from StateNode
type: 'branch' | 'leaf' | 'root'

Methods

getCurrent()

from StateNode

This node's current active child node, if any.

getCurrent(): StateNode | undefined

getCurrentToolIdMask()

from StateNode
getCurrentToolIdMask(): string | undefined

getIsActive()

from StateNode

Whether this node is active.

getIsActive(): boolean

getPath()

from StateNode

This node's path of active state nodes

getPath(): string

setCurrentToolIdMask()

from StateNode
setCurrentToolIdMask(id: string | undefined): void
Parameters
NameDescription

id

string | undefined
Returns
void

GeoShapeUtilHighlightShapeTool