Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 1be1ed0

Browse files
committed
notify parent when was moved (performance refactor)
1 parent 2a409d5 commit 1be1ed0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sortable.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ angular.module('ui.sortable', [])
370370
ui.item.sortable.moved);
371371
});
372372
}
373+
374+
if(wasMoved && !ui.item.sortable.received){
375+
scope.$emit('sortable:wasMoved');
376+
}
377+
373378
};
374379

375380
callbacks.stop = function(e, ui) {
@@ -406,9 +411,6 @@ angular.module('ui.sortable', [])
406411
// It's now safe to clear the savedNodes
407412
// since stop is the last callback.
408413
savedNodes = null;
409-
410-
//notifiy when sortable finished
411-
scope.$emit('sortable:finished');
412414
};
413415

414416
callbacks.receive = function(e, ui) {

0 commit comments

Comments
 (0)