DraggingState
⚠️ This class is for internal use only.
class DraggingState extends State
A state that activates when user's dragging the Flicking area
Properties
Methods
Properties
holding
readonly
Whether user is clicking or touching
Type: true
animating
readonly
Whether Flicking's animating
Type: true
delta
readonlyinherited
A sum of delta values of change events from the last hold event of Axes
Type: number
targetPanel
readonlyinherited
A panel to set as Control#activePanel after the animation is finished
Type: number
Methods
onEnter
inherited
An callback which is called when state has changed to this state
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
prevState | State | An previous state |
onHold
inherited
An event handler for Axes's hold event
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ctx | object | ✔️ | Event context | |
ctx.flicking | Flicking | ✔️ | An instance of Flicking | |
ctx.axesEvent | object | ✔️ | A hold event of Axes | |
ctx.transitTo | function | ✔️ | A function for changing current state to other state |
onChange
inherited
An event handler for Axes's change event
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ctx | object | ✔️ | Event context | |
ctx.flicking | Flicking | ✔️ | An instance of Flicking | |
ctx.axesEvent | object | ✔️ | A change event of Axes | |
ctx.transitTo | function | ✔️ | A function for changing current state to other state |
onRelease
inherited
An event handler for Axes's release event
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ctx | object | ✔️ | Event context | |
ctx.flicking | Flicking | ✔️ | An instance of Flicking | |
ctx.axesEvent | object | ✔️ | A release event of Axes | |
ctx.transitTo | function | ✔️ | A function for changing current state to other state |
onAnimationEnd
inherited
An event handler for Axes's animationEnd event
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ctx | object | ✔️ | Event context | |
ctx.flicking | Flicking | ✔️ | An instance of Flicking | |
ctx.axesEvent | object | ✔️ | A animationEnd event of Axes | |
ctx.transitTo | function | ✔️ | A function for changing current state to other state |
onFinish
inherited
An event handler for Axes's finish event
Returns: void
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
ctx | object | ✔️ | Event context | |
ctx.flicking | Flicking | ✔️ | An instance of Flicking | |
ctx.axesEvent | object | ✔️ | A finish event of Axes | |
ctx.transitTo | function | ✔️ | A function for changing current state to other state |