Index

Gesture

MMO.inputs · 1 symbol · generated 5 Oct 2026

class

Gesture

Gesture.js:18
Gesture Options: - allow_move: {Boolean} true to capture mouse move - allow_out: {Boolean} true to allow mouse to go out of the element Events : - fail - done - start - stop - updateclass MMO.inputs.Gesture extends MMO.core.EventEmitter
Namespace
MMO.inputs
Extends
EventEmitter

Index

node readonly accessor
constructor(input, name, opts)
toString()
remove()Unregister this gesture from its input.
isInTarget(e)Tells if event happened inside input element or one of its children
clear(status)[internal] Stop gesture by setting its status and unscheduling everything left
cancel()[internal]
done()[internal]
start()[internal]
stop()[internal]
update(e)Called everytime an event is captured from the element
allowDispatch(gesture)Called if status = S_IN and another gesture is completed.
statusProgress()Get the progress of the gesture before completion
setStatus(status)Set gesture status : - S_IDDLE: the gesture has not started.
schedule(name, time)Schedule a function
unschedule(name)Unschedule a function

Properties1

Methods15

constructor(input, name, opts)

Gesture.js:19
constructor(input, name, opts)
input
name
opts

remove()

Gesture.js:51

Unregister this gesture from its input.

remove()

isInTarget(e)

Gesture.js:60

Tells if event happened inside input element or one of its children

isInTarget(e)
eEvent
returnsBoolean

clear(status)

Gesture.js:78

[internal] Stop gesture by setting its status and unscheduling everything left

clear(status)
statusintby default MMO.inputs.S_IDDLE
returns

update(e)

Gesture.js:132

Called everytime an event is captured from the element

update(e)
eEventthe event
returnsbooltrue if gesture is completed

allowDispatch(gesture)

Gesture.js:146

Called if status = S_IN and another gesture is completed.

allowDispatch(gesture)Return false if you want to ignore the gesture
gestureGesture
returnsbool

statusProgress()

Gesture.js:154

Get the progress of the gesture before completion

statusProgress()
returnsfloat[0,1]

setStatus(status)

Gesture.js:169
Set gesture status : - S_IDDLE: the gesture has not started. No events are captured.setStatus(status)- S_IN: the gesture has started and events are captured. - S_DONE: the gesture has been completed. No events are captured.
statusnumber

schedule(name, time)

Gesture.js:188

Schedule a function

schedule(name, time)
namestringthe gesture's function to call
timeintin ms. The time to wait before calling function
returns

unschedule(name)

Gesture.js:202

Unschedule a function

unschedule(name)
namestringthe gesture's function to call
returns