ZoomTool
See source codeTable of contents
- id
- initial
- isLockable
- _currentToolIdMask
- _path
- children
- editor
- info
- parent
- performanceTracker
- shapeType
- type
- useCoalescedEvents
- Properties
- Methods
- children
- addChild
- 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 ZoomTool extends StateNode {}Constructor
from StateNode
Constructs a new instance of the StateNode class
Parameters
Properties
id
static
static id: stringinitial
static
static initial: stringisLockable
static
static isLockable: booleanchildren
optional
from StateNode
children?: Record<string, StateNode>editor
from StateNode
editor: Editorinfo
info: TLPointerEventInfo & {
onInteractionEnd?: string
}parent
from StateNode
parent: StateNodeperformanceTracker
from StateNode
performanceTracker: PerformanceTrackershapeType
optional
from StateNode
shapeType?: stringtype
from StateNode
type: 'branch' | 'leaf' | 'root'useCoalescedEvents
from StateNode
useCoalescedEvents: booleanMethods
children( )
static
static children(): TLStateNodeConstructor[]addChild( )
from StateNode
Add a child node to this state node.
addChild(childConstructor: TLStateNodeConstructor): thisParameters
| Name | Description |
|---|---|
|
Returns
thisenter( )
from StateNode
enter(info: any, from: string): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidexit( )
from StateNode
exit(info: any, to: 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( )
onEnter(
info: TLPointerEventInfo & {
onInteractionEnd: string
}
): voidParameters
| Name | Description |
|---|---|
| |
Returns
voidonExit( )
onExit(): voidonInterrupt( )
onInterrupt(): voidonKeyDown( )
onKeyDown(): voidonKeyRepeat( )
optional
from StateNode
onKeyRepeat?(info: TLKeyboardEventInfo): voidParameters
| Name | Description |
|---|---|
|
Returns
voidonKeyUp( )
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
VideoShapeUtilNext
EnumStyleProp