FrameShapeTool
Table of contents
- children
- id
- initial
- _currentToolIdMask
- _path
- editor
- enter
- exit
- handleEvent
- isLockable
- onCancel
- onComplete
- onCreate
- 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 BaseBoxShapeTool
.
class FrameShapeTool extends BaseBoxShapeTool {}
from
StateNode
Constructs a new instance of the StateNode
class
Parameters
Properties
from
BaseBoxShapeTool
static children: () => TLStateNodeConstructor[]
static id: string
static initial: string
from
StateNode
editor: Editor
from
StateNode
enter: (info: any, from: string) => void
from
StateNode
exit: (info: any, from: string) => void
from
StateNode
handleEvent: (info: Exclude<TLEventInfo, TLPinchEventInfo>) => void
from
StateNode
isLockable: boolean
from
StateNode
onCancel?: TLEventHandlers['onCancel']
from
StateNode
onComplete?: TLEventHandlers['onComplete']
onCreate: (shape: null | TLShape) => void
from
StateNode
onDoubleClick?: TLEventHandlers['onDoubleClick']
from
StateNode
onEnter?: TLEnterEventHandler
from
StateNode
onExit?: TLExitEventHandler
from
StateNode
onInterrupt?: TLEventHandlers['onInterrupt']
from
StateNode
onKeyDown?: TLEventHandlers['onKeyDown']
from
StateNode
onKeyRepeat?: TLEventHandlers['onKeyRepeat']
from
StateNode
onKeyUp?: TLEventHandlers['onKeyUp']
from
StateNode
onLongPress?: TLEventHandlers['onLongPress']
from
StateNode
onMiddleClick?: TLEventHandlers['onMiddleClick']
from
StateNode
onPointerDown?: TLEventHandlers['onPointerDown']
from
StateNode
onPointerMove?: TLEventHandlers['onPointerMove']
from
StateNode
onPointerUp?: TLEventHandlers['onPointerUp']
from
StateNode
onQuadrupleClick?: TLEventHandlers['onQuadrupleClick']
from
StateNode
onRightClick?: TLEventHandlers['onRightClick']
from
StateNode
onTick?: TLEventHandlers['onTick']
from
StateNode
onTripleClick?: TLEventHandlers['onTripleClick']
from
StateNode
onWheel?: TLEventHandlers['onWheel']
from
StateNode
parent: StateNode
from
StateNode
performanceTracker: PerformanceTracker
shapeType: string
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
Name | Description |
---|---|
| The id of the child state node to transition to. |
| Any data to pass to the |
from
StateNode
type: 'branch' | 'leaf' | 'root'
Methods
from
StateNode
This node's current active child node, if any.
getCurrent(): StateNode | undefined
from
StateNode
getCurrentToolIdMask(): string | undefined
from
StateNode
Whether this node is active.
getIsActive(): boolean
from
StateNode
This node's path of active state nodes
getPath(): string
from
StateNode
setCurrentToolIdMask(id: string | undefined): void
Parameters
Name | Description |
---|---|
|
|
Returns
void