class
SAPO.Utility.Swipe
Version:
0.1
Subscribe swipe gestures! Supports filtering swipes be any combination of the criteria supported in the options.
Since:
Defined in
Utility/Swipe/0.1/lib.js
October 2012
Constructor Summary
Constructor Details
constructor Swipe
Swipe(String|DOMElement
el, Object
options)
Parameters:
el
options
-
Function(Object) callback
required callback function. It receives all the extracted information: elementId, duration, dr, dist, axis -
[ Number minDist ]
minimum allowed distance, in pixels -
[ Number maxDist ]
maximum allowed distance, in pixels -
[ Number minDuration ]
minimum allowed duration, in seconds -
[ Number maxDuration ]
maximum allowed duration, in seconds -
[ String forceAxis ]
if either 'x' or 'y' is passed, only swipes where the dominant axis is the given one trigger the callback