Optional
angleOptional
debounceIf given, callback will be called at most once every debounceWindow
milliseconds.
Note that if both debounceWindow
and deltaThreshold
are set, both
must be exceeded before callback is called.
Optional
deltaCallback will only be called when the gesture's accumulated delta, since
the last time callback was called, exceeds deltaThreshold
.
At least one of the three deltas (X, Y or Z) must exceed this number (in
absolute value). Note that when comparing deltaZ
, it is multiplied by
100 since it represents fractions of 1 (100%). So supplying
deltaThreshold
of 10 means is equivalent to the following condition:
abs(deltaX) >= 10 || abs(deltaY) >= 10 || abs(1 - deltaZ) >= 0.1
Accumulation of the delta ends if the gesture is terminated, for example, in case of touch gestures, by a "touchcancel" event of by the final finger lifting off..
Note that if both debounceWindow
and deltaThreshold
are set, both
must be exceeded before callback is called.
Optional
devicesOne or more device types to listen for. If not specified, then all devices are enabled.
It can be a comma-separated list of GestureDevices or an array of such devices.
Optional
directionsIf given, callback will only be called if the gesture's direction is one of the given ones.
It can be a comma-separated list of Directions or an array of such directions.
Optional
intentsIf given, callback will only be called if the gesture's intent is one of the given ones.
It can be a comma-separated list of GestureIntents or an array of such intents.
Optional
maxSet maximum total delta X. Further increase in delta X above this value will be ignored.
The value is in pixels.
Optional
maxSet maximum total delta Y. Further increase in delta Y above this value will be ignored.
The value is in pixels.
Optional
maxSet maximum total delta Z. Further increase in delta Z above this value will be ignored.
The value is in percentage zoom, relative to 1, and must be positive.
Optional
minSet minimum total delta X. Further reductions in delta X below this value will be ignored.
The value is in pixels and can be negative.
Optional
minSet minimum total delta Y. Further reductions in delta Y below this value will be ignored.
The value is in pixels and can be negative.
Optional
minSet minimum total delta Z. Further reductions in delta Z below this value will be ignored.
The value is in percentage zoom, relative to 1, and can be less than 1 but must be > 0.1 which is a hard minimum.
Optional
naturalWhether touch scroll gestures follow the natural direction: swipe up with scroll intent results in direction down and swipe down results in direction up.
Optional
preventIf true, the events of the gesture, e.g. relevant key presses or touch moves, etc, will have their default action prevented.
IMPORTANT: For pointer gestures, then pointer/mouse down and click will be prevented.
Optional
touchIf the user presses and holds on a touchscreen for at least the given amount of milliseconds before moving the finger(s), touch gestures other than pinch will be treated as a drag intent instead of scroll as long as the number of fingers touching the screen is touchDragNumFingers.
Set to 0 in order to treat all non-pinch touch gestures as drag.
Set to a negative number in order to treat all non-pinch touch gestures as scroll.
Optional
touchThe number of fingers that could be considered a drag intent for touch gestures.
See getVectorDirection.