|
|
|
@ -209,7 +209,8 @@
|
|
|
|
|
delay: 0, |
|
|
|
|
forceFallback: false, |
|
|
|
|
fallbackClass: 'sortable-fallback', |
|
|
|
|
fallbackOnBody: false |
|
|
|
|
fallbackOnBody: false, |
|
|
|
|
fallbackTolerance: 0 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -321,6 +322,9 @@
|
|
|
|
|
nextEl = dragEl.nextSibling; |
|
|
|
|
activeGroup = options.group; |
|
|
|
|
|
|
|
|
|
this._lastX = (touch || evt).clientX; |
|
|
|
|
this._lastY = (touch || evt).clientY; |
|
|
|
|
|
|
|
|
|
dragStartFn = function () { |
|
|
|
|
// Delayed drag has been triggered
|
|
|
|
|
// we can re-enable the events: touchmove/mousemove
|
|
|
|
@ -465,16 +469,23 @@
|
|
|
|
|
|
|
|
|
|
_onTouchMove: function (/**TouchEvent*/evt) { |
|
|
|
|
if (tapEvt) { |
|
|
|
|
|
|
|
|
|
var touch = evt.touches ? evt.touches[0] : evt; |
|
|
|
|
|
|
|
|
|
// only set the status to dragging, when we are actually dragging
|
|
|
|
|
if (!Sortable.active) { |
|
|
|
|
if (this.options.fallbackTolerance) { |
|
|
|
|
if (Math.min(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < this.options.fallbackTolerance) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this._dragStarted(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// as well as creating the ghost element on the document body
|
|
|
|
|
this._appendGhost(); |
|
|
|
|
|
|
|
|
|
var touch = evt.touches ? evt.touches[0] : evt, |
|
|
|
|
dx = touch.clientX - tapEvt.clientX, |
|
|
|
|
var dx = touch.clientX - tapEvt.clientX, |
|
|
|
|
dy = touch.clientY - tapEvt.clientY, |
|
|
|
|
translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)'; |
|
|
|
|
|
|
|
|
|