API Docs for: 1.1.2

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: false
dragBlockVertical <Boolean>
src/gestures/drag.js:186

same as dragBlockHorizontal, but for vertical movement

Default: false
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: true
dragLockMinDistance <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: 25
dragLockToAxis <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: false
dragMaxTouches <Number>
src/gestures/drag.js:168

set 0 for unlimited, but this can conflict with transform

Default: 1
dragMinDistance <Number>
src/gestures/drag.js:149

minimal movement that have to be made before the drag event gets triggered

Default: 10
drag
src/gestures/drag.js:17 Extra event object properties:
dragdown
src/gestures/drag.js:41 Extra event object properties:
dragend
src/gestures/drag.js:25 Extra event object properties:
dragright
src/gestures/drag.js:33 Extra event object properties:
dragstart
src/gestures/drag.js:21 Extra event object properties:
dragup
src/gestures/drag.js:37 Extra event object properties:
drapleft
src/gestures/drag.js:29 Extra event object properties: