Browse Source

Don't swap when dropping onto the same element

pull/1361/head
Ken Cation 6 years ago
parent
commit
9615453740
  1. 3
      Sortable.js
  2. 2
      Sortable.min.js

3
Sortable.js

@ -1039,9 +1039,12 @@
}
if (options.swap && lastEl)
{
if (dragEl !== lastEl)
{
_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex, evt, {swapItem:lastEl});
}
}
else
{
_dispatchEvent(this, rootEl, 'end', dragEl, parentEl, rootEl, oldIndex, newIndex, evt);

2
Sortable.min.js vendored

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