|
|
@ -247,9 +247,11 @@ |
|
|
|
_dispatchEvent(dragEl, 'start'); |
|
|
|
_dispatchEvent(dragEl, 'start'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cloneEl = dragEl.cloneNode(true); |
|
|
|
if (activeGroup.pull == 'clone') { |
|
|
|
_css(cloneEl, 'display', 'none'); |
|
|
|
cloneEl = dragEl.cloneNode(true); |
|
|
|
rootEl.insertBefore(cloneEl, dragEl); |
|
|
|
_css(cloneEl, 'display', 'none'); |
|
|
|
|
|
|
|
rootEl.insertBefore(cloneEl, dragEl); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -375,13 +377,13 @@ |
|
|
|
target = _closest(evt.target, this.options.draggable, el); |
|
|
|
target = _closest(evt.target, this.options.draggable, el); |
|
|
|
dragRect = dragEl.getBoundingClientRect(); |
|
|
|
dragRect = dragEl.getBoundingClientRect(); |
|
|
|
|
|
|
|
|
|
|
|
if ((activeGroup.pull == 'clone') && (cloneEl.state !== isOwner)) { |
|
|
|
if (cloneEl && (cloneEl.state !== isOwner)) { |
|
|
|
_css(cloneEl, 'display', isOwner ? 'none' : ''); |
|
|
|
_css(cloneEl, 'display', isOwner ? 'none' : ''); |
|
|
|
!isOwner && cloneEl.state && rootEl.insertBefore(cloneEl, dragEl); |
|
|
|
!isOwner && cloneEl.state && rootEl.insertBefore(cloneEl, dragEl); |
|
|
|
cloneEl.state = isOwner; |
|
|
|
cloneEl.state = isOwner; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (revert) { |
|
|
|
if (revert && cloneEl) { |
|
|
|
rootEl.insertBefore(dragEl, cloneEl); |
|
|
|
rootEl.insertBefore(dragEl, cloneEl); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -504,7 +506,7 @@ |
|
|
|
_dispatchEvent(dragEl, 'update'); |
|
|
|
_dispatchEvent(dragEl, 'update'); |
|
|
|
_dispatchEvent(dragEl, 'sort'); |
|
|
|
_dispatchEvent(dragEl, 'sort'); |
|
|
|
|
|
|
|
|
|
|
|
cloneEl.parentNode.removeChild(cloneEl); |
|
|
|
cloneEl && cloneEl.parentNode.removeChild(cloneEl); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_dispatchEvent(rootEl, 'end'); |
|
|
|
_dispatchEvent(rootEl, 'end'); |
|
|
|