Browse Source

#238: * scope after event

drop-text
RubaXa 10 years ago
parent
commit
705b3ed1ae
  1. 5
      ng-sortable.js

5
ng-sortable.js

@ -15,7 +15,7 @@
'use strict';
angular.module('ng-sortable', [])
.constant('$version', '0.3.4')
.constant('$version', '0.3.5')
.directive('ngSortable', ['$parse', function ($parse) {
var removed,
nextSibling;
@ -101,13 +101,16 @@
onStart: function (/**Event*/evt) {
nextSibling = evt.item.nextSibling;
options.onStart(source.items());
scope.$apply();
},
onEnd: function () {
options.onEnd(source.items());
scope.$apply();
},
onAdd: function (/**Event*/evt) {
_sync(evt);
options.onAdd(source.items(), removed);
scope.$apply();
},
onUpdate: function (/**Event*/evt) {
_sync(evt);

Loading…
Cancel
Save