Class Drag
Class defined in:src/gestures/drag.js:4
Move with x fingers (default 1) around on the page. Preventing the default browser behavior is a good way to improve feel and working.
hammertime.on("drag", function(ev) {
console.log(ev);
ev.gesture.preventDefault();
});
dragBlockHorizontal
<Boolean>
src/gestures/drag.js:176
prevent default browser behavior when dragging occurs be careful with it, it makes the element a blocking element when you are using the drag gesture, it is a good practice to set this true
Default: falsedragBlockVertical
<Boolean>
src/gestures/drag.js:186
same as dragBlockHorizontal
, but for vertical movement
dragDistanceCorrection
<Boolean>
src/gestures/drag.js:157
Set dragDistanceCorrection to true to make the starting point of the drag be calculated from where the drag was triggered, not from where the touch started. Useful to avoid a jerk-starting drag, which can make fine-adjustments through dragging difficult, and be visually unappealing.
Default: truedragLockMinDistance
<Number>
src/gestures/drag.js:203
drag lock only kicks in when distance > dragLockMinDistance This way, locking occurs only when the distance has become large enough to reliably determine the direction
Default: 25dragLockToAxis
<Boolean>
src/gestures/drag.js:194
dragLockToAxis keeps the drag gesture on the axis that it started on, It disallows vertical directions if the initial direction was horizontal, and vice versa.
Default: falsedragMaxTouches
<Number>
src/gestures/drag.js:168
set 0 for unlimited, but this can conflict with transform
Default: 1dragMinDistance
<Number>
src/gestures/drag.js:149
minimal movement that have to be made before the drag event gets triggered
Default: 10