|
|
@ -681,7 +681,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
_cloneHide(isOwner); |
|
|
|
_cloneHide(isOwner); |
|
|
|
|
|
|
|
|
|
|
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect) !== false) { |
|
|
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt) !== false) { |
|
|
|
if (!dragEl.contains(el)) { |
|
|
|
if (!dragEl.contains(el)) { |
|
|
|
el.appendChild(dragEl); |
|
|
|
el.appendChild(dragEl); |
|
|
|
parentEl = el; // actualization
|
|
|
|
parentEl = el; // actualization
|
|
|
@ -708,7 +708,7 @@ |
|
|
|
isLong = (target.offsetHeight > dragEl.offsetHeight), |
|
|
|
isLong = (target.offsetHeight > dragEl.offsetHeight), |
|
|
|
halfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5, |
|
|
|
halfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5, |
|
|
|
nextSibling = target.nextElementSibling, |
|
|
|
nextSibling = target.nextElementSibling, |
|
|
|
moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect), |
|
|
|
moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt), |
|
|
|
after |
|
|
|
after |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
@ -1158,7 +1158,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect) { |
|
|
|
function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvt) { |
|
|
|
var evt, |
|
|
|
var evt, |
|
|
|
sortable = fromEl[expando], |
|
|
|
sortable = fromEl[expando], |
|
|
|
onMoveFn = sortable.options.onMove, |
|
|
|
onMoveFn = sortable.options.onMove, |
|
|
@ -1177,7 +1177,7 @@ |
|
|
|
fromEl.dispatchEvent(evt); |
|
|
|
fromEl.dispatchEvent(evt); |
|
|
|
|
|
|
|
|
|
|
|
if (onMoveFn) { |
|
|
|
if (onMoveFn) { |
|
|
|
retVal = onMoveFn.call(sortable, evt); |
|
|
|
retVal = onMoveFn.call(sortable, evt, originalEvt); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return retVal; |
|
|
|
return retVal; |
|
|
|