Skip to content

Commit

Permalink
Merge pull request #36 from Stevebel/fix-move-acts-as-clone
Browse files Browse the repository at this point in the history
Correctly determine if element should be moved or cloned
  • Loading branch information
samjacobclift authored Nov 7, 2017
2 parents 6e401c7 + 34d2302 commit a78d2de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion angular-legacy-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

removed = prevItems[oldIndex];

if (evt.clone) {
if (Sortable.active && Sortable.active.lastPullMode === 'clone') {
removed = angular.copy(removed);
prevItems.splice(Sortable.utils.index(evt.clone, sortable.options.draggable), 0, prevItems.splice(oldIndex, 1)[0]);

Expand Down

0 comments on commit a78d2de

Please sign in to comment.