Browse Source

Merge pull request #893 from sdesapio/dev

Replaced xOffset and yOffset -> fallbackOffset: {x: 0, y: 0}
pull/612/merge
Lebedev Konstantin 9 years ago committed by GitHub
parent
commit
75306c406e
  1. 8
      Sortable.js

8
Sortable.js

@ -255,7 +255,8 @@
forceFallback: false,
fallbackClass: 'sortable-fallback',
fallbackOnBody: false,
fallbackTolerance: 0
fallbackTolerance: 0,
fallbackOffset: {x: 0, y: 0}
};
@ -524,9 +525,10 @@
if (tapEvt) {
var options = this.options,
fallbackTolerance = options.fallbackTolerance,
fallbackOffset = options.fallbackOffset,
touch = evt.touches ? evt.touches[0] : evt,
dx = touch.clientX - tapEvt.clientX,
dy = touch.clientY - tapEvt.clientY,
dx = (touch.clientX - tapEvt.clientX) + fallbackOffset.x,
dy = (touch.clientY - tapEvt.clientY) + fallbackOffset.y,
translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';
// only set the status to dragging, when we are actually dragging

Loading…
Cancel
Save