TextShapeTool
See source codeTable of contents
- id
- initial
- _currentToolIdMask
- _path
- children
- editor
- isLockable
- parent
- performanceTracker
- shapeType
- type
- Properties
- Methods
- children
- enter
- exit
- getCurrent
- getCurrentToolIdMask
- getIsActive
- getPath
- handleEvent
- onCancel
- onComplete
- onDoubleClick
- onEnter
- onExit
- onInterrupt
- onKeyDown
- onKeyRepeat
- onKeyUp
- onLongPress
- onMiddleClick
- onPointerDown
- onPointerMove
- onPointerUp
- onQuadrupleClick
- onRightClick
- onTick
- onTripleClick
- onWheel
- setCurrentToolIdMask
- transition
Extends StateNode.
class TextShapeTool extends StateNode {}Constructor
from StateNode
Constructs a new instance of the StateNode class
Parameters
Properties
id
static
static id: stringinitial
static
static initial: stringchildren
optional
from StateNode
children?: Record<string, StateNode>editor
from StateNode
editor: EditorisLockable
from StateNode
isLockable: booleanparent
from StateNode
parent: StateNodeperformanceTracker
from StateNode
performanceTracker: PerformanceTrackershapeType
shapeType: stringtype
from StateNode
type: 'branch' | 'leaf' | 'root'Methods
children()
static
static children(): TLStateNodeConstructor[]enter()
from StateNode
enter(info: any, from: string): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidexit()
from StateNode
exit(info: any, from: string): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidgetCurrent()
from StateNode
This node's current active child node, if any.
getCurrent(): StateNode | undefinedgetCurrentToolIdMask()
from StateNode
getCurrentToolIdMask(): string | undefinedgetIsActive()
from StateNode
Whether this node is active.
getIsActive(): booleangetPath()
from StateNode
This node's path of active state nodes
getPath(): stringhandleEvent()
from StateNode
handleEvent(info: Exclude<TLEventInfo, TLPinchEventInfo>): voidParameters
| Name | Description |
|---|---|
| |
Returns
voidonCancel()
optional
from StateNode
onCancel?(info: TLCancelEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonComplete()
optional
from StateNode
onComplete?(info: TLCompleteEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonDoubleClick()
optional
from StateNode
onDoubleClick?(info: TLClickEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonEnter()
optional
from StateNode
onEnter?(info: any, from: string): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidonExit()
optional
from StateNode
onExit?(info: any, to: string): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidonInterrupt()
optional
from StateNode
onInterrupt?(info: TLInterruptEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonKeyDown()
optional
from StateNode
onKeyDown?(info: TLKeyboardEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonKeyRepeat()
optional
from StateNode
onKeyRepeat?(info: TLKeyboardEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonKeyUp()
optional
from StateNode
onKeyUp?(info: TLKeyboardEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonLongPress()
optional
from StateNode
onLongPress?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonMiddleClick()
optional
from StateNode
onMiddleClick?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonPointerDown()
optional
from StateNode
onPointerDown?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonPointerMove()
optional
from StateNode
onPointerMove?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonPointerUp()
optional
from StateNode
onPointerUp?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonQuadrupleClick()
optional
from StateNode
onQuadrupleClick?(info: TLClickEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonRightClick()
optional
from StateNode
onRightClick?(info: TLPointerEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonTick()
optional
from StateNode
onTick?(info: TLTickEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonTripleClick()
optional
from StateNode
onTripleClick?(info: TLClickEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonWheel()
optional
from StateNode
onWheel?(info: TLWheelEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidsetCurrentToolIdMask()
from StateNode
setCurrentToolIdMask(id: string | undefined): voidParameters
| Name | Description |
|---|---|
| |
Returns
voidtransition()
from StateNode
Transition to a new active child state node.
transition(id: string, info?: any): thisExample
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 |
Returns
thisPrev
SelectToolNext
TextShapeUtil