Browse Source

#489: * Fixed 'clone'

pull/496/head
RubaXa 10 years ago
parent
commit
304c04fd2d
  1. 7
      Sortable.js
  2. 2
      Sortable.min.js

7
Sortable.js

@ -573,7 +573,7 @@
target = _closest(evt.target, options.draggable, el); target = _closest(evt.target, options.draggable, el);
dragRect = dragEl.getBoundingClientRect(); dragRect = dragEl.getBoundingClientRect();
parentEl = target && target.parentNode; // actualization
if (revert) { if (revert) {
_cloneHide(true); _cloneHide(true);
@ -725,6 +725,7 @@
if (rootEl !== parentEl) { if (rootEl !== parentEl) {
newIndex = _index(dragEl); newIndex = _index(dragEl);
if (newIndex != -1) { if (newIndex != -1) {
// drag from one list and drop into another // drag from one list and drop into another
_dispatchEvent(null, parentEl, 'sort', dragEl, rootEl, oldIndex, newIndex); _dispatchEvent(null, parentEl, 'sort', dragEl, rootEl, oldIndex, newIndex);
@ -760,7 +761,7 @@
this.save(); this.save();
} }
} }
// Nulling // Nulling
rootEl = rootEl =
dragEl = dragEl =
@ -1185,7 +1186,7 @@
Sortable.create = function (el, options) { Sortable.create = function (el, options) {
return new Sortable(el, options); return new Sortable(el, options);
}; };
// Export // Export
Sortable.version = '1.2.2'; Sortable.version = '1.2.2';

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save