diff --git a/Sortable.js b/Sortable.js index 52b2d2dd41272e2fd67dd0187c8082bca9dd2e0d..5bf9680acb18fc12beadca1c51ad7fc2fa30f4a3 100644 --- a/Sortable.js +++ b/Sortable.js @@ -243,7 +243,8 @@ forceFallback: false, fallbackClass: 'sortable-fallback', fallbackOnBody: false, - fallbackTolerance: 0 + fallbackTolerance: 0, + fallbackOffset: {x: 0, y: 0} }; @@ -513,8 +514,8 @@ var options = this.options, fallbackTolerance = options.fallbackTolerance, touch = evt.touches ? evt.touches[0] : evt, - dx = touch.clientX - tapEvt.clientX, - dy = touch.clientY - tapEvt.clientY, + dx = (touch.clientX - tapEvt.clientX) + this.options.fallbackOffset.x, + dy = (touch.clientY - tapEvt.clientY) + this.options.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