Skip to content

Commit 12df12c

Browse files
committed
* correct ng-events
1 parent c1f6cf5 commit 12df12c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ng-sortable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
angular.module('ng-sortable', [])
28-
.constant('version', '0.3.6')
28+
.constant('version', '0.3.7')
2929
.directive('ngSortable', ['$parse', function ($parse) {
3030
var removed,
3131
nextSibling;
@@ -78,7 +78,7 @@
7878

7979
/* jshint expr:true */
8080
options[name] && options[name]({
81-
model: item,
81+
model: item || source && source.item(evt.item),
8282
models: source && source.items(),
8383
oldIndex: evt.oldIndex,
8484
newIndex: evt.newIndex
@@ -143,13 +143,13 @@
143143
},
144144
onUpdate: function (/**Event*/evt) {
145145
_sync(evt);
146-
_emitEvent(evt, source && source.item(evt.item));
146+
_emitEvent(evt);
147147
},
148148
onRemove: function (/**Event*/evt) {
149149
_emitEvent(evt, removed);
150150
},
151151
onSort: function (/**Event*/evt) {
152-
_emitEvent(evt, source && source.item(evt.item));
152+
_emitEvent(evt);
153153
}
154154
}));
155155

0 commit comments

Comments
 (0)