public class Swipe
- extends Object
A swipe object used to make a DOM element swipe-able.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void $init(Object widget,
- The Constructor.
widget - the object for swipe.
It can be anything, but it is usually a widget (
node - [optional] the DOM element that is made to be swipe-able.
If omitted and widget is a widget,
Widget.$n(_global_.String) is assumed.
opts - [optional] options. Allowed options:
- int scrollThreshold: swipe displacement(pixel). When larger than threshold, prevent page scrolling. Default: 5.
- int duration: swipe start to end time duration(millisecond). When larger than time duration, it is not a swipe action. Default: 500.
- int minDisplacement: the minimum swipe displacement(pixel). When smaller than minimum displacement, it is not a swipe action. Default: 30.
- int maxDisplacement: the maximum swipe displacement(pixel). When larger than maximum displacement, it is not a swipe action. Default: 75.
public void destroy()
- Destroys this swipe-able object.
This method must be called to clean up, if you don't want to associate the swipe-able feature to a DOM element.
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.