TextShapeTool
Table of contents
- children
- id
- initial
- isLockable
- _currentToolIdMask
- _path
- editor
- enter
- exit
- handleEvent
- onCancel
- onComplete
- onDoubleClick
- onEnter
- onExit
- onInterrupt
- onKeyDown
- onKeyRepeat
- onKeyUp
- onLongPress
- onMiddleClick
- onPointerDown
- onPointerMove
- onPointerUp
- onQuadrupleClick
- onRightClick
- onTick
- onTripleClick
- onWheel
- parent
- performanceTracker
- shapeType
- transition
- type
- Properties
- Methods
Extends StateNode.
class TextShapeTool extends StateNode {}
from
StateNodeConstructs a new instance of the StateNode class
Parameters
Properties
static children: () => TLStateNodeConstructor[]
static id: string
static initial: string
static isLockable: boolean
from
StateNodeeditor: Editor
from
StateNodeenter: (info: any, from: string) => void
from
StateNodeexit: (info: any, from: string) => void
from
StateNodehandleEvent: (info: Exclude<TLEventInfo, TLPinchEventInfo>) => void
from
StateNodeonCancel?: TLEventHandlers['onCancel']
from
StateNodeonComplete?: TLEventHandlers['onComplete']
from
StateNodeonDoubleClick?: TLEventHandlers['onDoubleClick']
from
StateNodeonEnter?: TLEnterEventHandler
from
StateNodeonExit?: TLExitEventHandler
from
StateNodeonInterrupt?: TLEventHandlers['onInterrupt']
from
StateNodeonKeyDown?: TLEventHandlers['onKeyDown']
from
StateNodeonKeyRepeat?: TLEventHandlers['onKeyRepeat']
from
StateNodeonKeyUp?: TLEventHandlers['onKeyUp']
from
StateNodeonLongPress?: TLEventHandlers['onLongPress']
from
StateNodeonMiddleClick?: TLEventHandlers['onMiddleClick']
from
StateNodeonPointerDown?: TLEventHandlers['onPointerDown']
from
StateNodeonPointerMove?: TLEventHandlers['onPointerMove']
from
StateNodeonPointerUp?: TLEventHandlers['onPointerUp']
from
StateNodeonQuadrupleClick?: TLEventHandlers['onQuadrupleClick']
from
StateNodeonRightClick?: TLEventHandlers['onRightClick']
from
StateNodeonTick?: TLEventHandlers['onTick']
from
StateNodeonTripleClick?: TLEventHandlers['onTripleClick']
from
StateNodeonWheel?: TLEventHandlers['onWheel']
from
StateNodeparent: StateNode
from
StateNodeperformanceTracker: PerformanceTracker
shapeType: string
from
StateNodeTransition to a new active child state node.
transition: (id: string, info?: any) => this
Example
parentState.transition('childStateA')
parentState.transition('childStateB', { myData: 4 })
Parameters
| Name | Description |
|---|---|
| The id of the child state node to transition to. |
| Any data to pass to the |
from
StateNodetype: 'branch' | 'leaf' | 'root'
Methods
from
StateNodeThis node's current active child node, if any.
getCurrent(): StateNode | undefined
from
StateNodegetCurrentToolIdMask(): string | undefined
from
StateNodeWhether this node is active.
getIsActive(): boolean
from
StateNodeThis node's path of active state nodes
getPath(): string
from
StateNodesetCurrentToolIdMask(id: string | undefined): void
Parameters
| Name | Description |
|---|---|
| |
Returns
void

