Browse Source

#256: - _onDrag

scroll
RubaXa 10 years ago
parent
commit
4c0f1afd32
  1. 12
      Sortable.js

12
Sortable.js

@ -407,7 +407,6 @@
_css(ghostEl, 'msTransform', translate3d); _css(ghostEl, 'msTransform', translate3d);
_css(ghostEl, 'transform', translate3d); _css(ghostEl, 'transform', translate3d);
this._onDrag(touch);
evt.preventDefault(); evt.preventDefault();
} }
}, },
@ -492,9 +491,7 @@
!options.dragoverBubble && evt.stopPropagation(); !options.dragoverBubble && evt.stopPropagation();
} }
_autoScroll(evt, options, this.el); if (activeGroup && !options.disabled &&
if (!_silent && activeGroup && !options.disabled &&
(isOwner (isOwner
? canSort || (revert = !rootEl.contains(dragEl)) ? canSort || (revert = !rootEl.contains(dragEl))
: activeGroup.pull && groupPut && ( : activeGroup.pull && groupPut && (
@ -504,6 +501,13 @@
) && ) &&
(evt.rootEl === void 0 || evt.rootEl === this.el) (evt.rootEl === void 0 || evt.rootEl === this.el)
) { ) {
// Smart auto-scrolling
_autoScroll(evt, options, this.el);
if (_silent) {
return;
}
target = _closest(evt.target, options.draggable, el); target = _closest(evt.target, options.draggable, el);
dragRect = dragEl.getBoundingClientRect(); dragRect = dragEl.getBoundingClientRect();

Loading…
Cancel
Save