Table of contents

Extends StateNode.

class ZoomTool 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

info

info: TLPointerEventInfo & {
  onInteractionEnd?: string | undefined
}

onCancel

from StateNode
onCancel?: TLEventHandlers['onCancel']

onComplete

from StateNode
onComplete?: TLEventHandlers['onComplete']

onDoubleClick

from StateNode
onDoubleClick?: TLEventHandlers['onDoubleClick']

onEnter

onEnter: (
  info: TLPointerEventInfo & {
    onInteractionEnd: string
  }
) => void

onExit

onExit: () => void

onInterrupt

onInterrupt: TLInterruptEvent

onKeyDown

onKeyDown: TLKeyboardEvent | undefined

onKeyRepeat

from StateNode
onKeyRepeat?: TLEventHandlers['onKeyRepeat']

onKeyUp

onKeyUp: TLKeyboardEvent

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

from StateNode
onQuadrupleClick?: TLEventHandlers['onQuadrupleClick']

onRightClick

from StateNode
onRightClick?: TLEventHandlers['onRightClick']

onTick

from StateNode
onTick?: TLEventHandlers['onTick']

onTripleClick

from StateNode
onTripleClick?: TLEventHandlers['onTripleClick']

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

VideoShapeUtilEnumStyleProp