class SAPO.Utility.Swipe
Authors:
jose.p.dias AT co.sapo.pt
Version:
0.1
 Subscribe swipe gestures!
 Supports filtering swipes be any combination of the criteria supported in the options.
 
Since:
October 2012
Defined in Utility/Swipe/0.1/lib.js

Constructor Summary
Swipe (String|DOMElement el, Object options)

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