Skip to main content
Version: 4.11.4

State

⚠️ This class is for internal use only.
class State

A component that shows the current status of the user input or the animation

Properties

holding

readonly

Whether user is clicking or touching

Type: boolean

animating

readonly

Whether Flicking's animating

Type: boolean

delta

readonly

A sum of delta values of change events from the last hold event of Axes

Type: number

targetPanel

readonly

A panel to set as Control#activePanel after the animation is finished

Type: number

Methods

onEnter

An callback which is called when state has changed to this state

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
prevStateStateAn previous state

onHold

An event handler for Axes's hold event

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
ctxobject✔️Event context
ctx.flickingFlicking✔️An instance of Flicking
ctx.axesEventobject✔️A hold event of Axes
ctx.transitTofunction✔️A function for changing current state to other state

onChange

An event handler for Axes's change event

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
ctxobject✔️Event context
ctx.flickingFlicking✔️An instance of Flicking
ctx.axesEventobject✔️A change event of Axes
ctx.transitTofunction✔️A function for changing current state to other state

onRelease

An event handler for Axes's release event

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
ctxobject✔️Event context
ctx.flickingFlicking✔️An instance of Flicking
ctx.axesEventobject✔️A release event of Axes
ctx.transitTofunction✔️A function for changing current state to other state

onAnimationEnd

An event handler for Axes's animationEnd event

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
ctxobject✔️Event context
ctx.flickingFlicking✔️An instance of Flicking
ctx.axesEventobject✔️A animationEnd event of Axes
ctx.transitTofunction✔️A function for changing current state to other state

onFinish

An event handler for Axes's finish event

Returns: void

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
ctxobject✔️Event context
ctx.flickingFlicking✔️An instance of Flicking
ctx.axesEventobject✔️A finish event of Axes
ctx.transitTofunction✔️A function for changing current state to other state