Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlac committed Mar 12, 2013
1 parent 24477c0 commit 412d2d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jquery.dragcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@

var dragEnd = function() {
if(window.dragCheck_state !== null) {
window.dragCheck_state = null;
window.dragCheck_origin = null;
window.dragCheck_items.push(dragCheck_origin);

if(settings.onDragEnd) {
settings.onDragEnd(window.dragCheck_items);
Expand All @@ -38,6 +37,8 @@
}
}

window.dragCheck_state = null;
window.dragCheck_origin = null;
window.dragCheck_items = [];
}
}
Expand All @@ -54,7 +55,7 @@
var item = $(this).add(window.dragCheck_origin).prop('checked', window.dragCheck_state);

if(settings.deferChangeTrigger) {
window.dragCheck_items.push(item);
window.dragCheck_items.push(this);
} else {
if(settings.onChange)
settings.onChange.call(item, e);
Expand Down

0 comments on commit 412d2d9

Please sign in to comment.