Browse Source

Merge pull request #459 from sp-kilobug/sp-kilobug-patch-3

improves the fallback mode fluidity
pull/408/merge
Lebedev Konstantin 9 years ago
parent
commit
9660e8e207
  1. 8
      Sortable.js

8
Sortable.js

@ -400,6 +400,12 @@
_emulateDragOver: function () { _emulateDragOver: function () {
if (touchEvt) { if (touchEvt) {
if (this._lastX===touchEvt.clientX && this._lastY===touchEvt.clientY ) {
return;
}
this._lastX=touchEvt.clientX;
this._lastY=touchEvt.clientY;
_css(ghostEl, 'display', 'none'); _css(ghostEl, 'display', 'none');
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY), var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY),
@ -514,7 +520,7 @@
_on(document, 'mouseup', this._onDrop); _on(document, 'mouseup', this._onDrop);
} }
this._loopId = setInterval(this._emulateDragOver, 150); this._loopId = setInterval(this._emulateDragOver, 50);
} }
else { else {
if (dataTransfer) { if (dataTransfer) {

Loading…
Cancel
Save