|
|
@ -33,6 +33,7 @@ |
|
|
|
rootEl, |
|
|
|
rootEl, |
|
|
|
nextEl, |
|
|
|
nextEl, |
|
|
|
lastDownEl, |
|
|
|
lastDownEl, |
|
|
|
|
|
|
|
lastOver, |
|
|
|
|
|
|
|
|
|
|
|
scrollEl, |
|
|
|
scrollEl, |
|
|
|
scrollParentEl, |
|
|
|
scrollParentEl, |
|
|
@ -456,6 +457,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
_triggerDragStart: function (/** Event */evt, /** Touch */touch) { |
|
|
|
_triggerDragStart: function (/** Event */evt, /** Touch */touch) { |
|
|
|
touch = touch || (evt.pointerType == 'touch' ? evt : null); |
|
|
|
touch = touch || (evt.pointerType == 'touch' ? evt : null); |
|
|
|
|
|
|
|
|
|
|
|
if (touch) { |
|
|
|
if (touch) { |
|
|
|
// Touch device support
|
|
|
|
// Touch device support
|
|
|
|
tapEvt = { |
|
|
|
tapEvt = { |
|
|
@ -495,10 +497,12 @@ |
|
|
|
_toggleClass(dragEl, options.ghostClass, true); |
|
|
|
_toggleClass(dragEl, options.ghostClass, true); |
|
|
|
_toggleClass(dragEl, options.dragClass, false); |
|
|
|
_toggleClass(dragEl, options.dragClass, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lastOver = this; |
|
|
|
Sortable.active = this; |
|
|
|
Sortable.active = this; |
|
|
|
|
|
|
|
|
|
|
|
// Drag start event
|
|
|
|
// Drag start event
|
|
|
|
_dispatchEvent(this, rootEl, 'start', dragEl, rootEl, oldIndex); |
|
|
|
_dispatchEvent(this, rootEl, 'start', dragEl, rootEl, oldIndex); |
|
|
|
|
|
|
|
_dispatchEvent(this, rootEl, 'enter', dragEl, rootEl, oldIndex); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this._nulling(); |
|
|
|
this._nulling(); |
|
|
|
} |
|
|
|
} |
|
|
@ -683,6 +687,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
moved = true; |
|
|
|
moved = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (lastOver !== this) { |
|
|
|
|
|
|
|
_dispatchEvent(lastOver, lastOver.el, 'leave', dragEl); |
|
|
|
|
|
|
|
_dispatchEvent(this, el, 'enter', dragEl, lastOver.el); |
|
|
|
|
|
|
|
lastOver = this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (activeSortable && !options.disabled && |
|
|
|
if (activeSortable && !options.disabled && |
|
|
|
(isOwner |
|
|
|
(isOwner |
|
|
|
? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
|
|
|
|
? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
|
|
|
@ -945,6 +955,7 @@ |
|
|
|
nextEl = |
|
|
|
nextEl = |
|
|
|
cloneEl = |
|
|
|
cloneEl = |
|
|
|
lastDownEl = |
|
|
|
lastDownEl = |
|
|
|
|
|
|
|
lastOver = |
|
|
|
|
|
|
|
|
|
|
|
scrollEl = |
|
|
|
scrollEl = |
|
|
|
scrollParentEl = |
|
|
|
scrollParentEl = |
|
|
|