Skip to content
Permalink
Browse files

draggable: the snap events 'release' and 'snap' now both have valid m…

…ousemove events attached.
  • Loading branch information...
Paul Bakaus
Paul Bakaus committed Nov 21, 2008
1 parent fa38ac5 commit 4b2a73e2b2d54d95b3536392a46bdac5e0db1a06
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/ui.draggable.js
@@ -625,7 +625,7 @@ $.ui.plugin.add("draggable", "snap", {

//Yes, I know, this is insane ;)
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
inst.snapElements[i].snapping = false;
continue;
}
@@ -655,7 +655,7 @@ $.ui.plugin.add("draggable", "snap", {
}

if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
inst.snapElements[i].snapping = (ts || bs || ls || rs || first);

};

0 comments on commit 4b2a73e

Please sign in to comment.
You can’t perform that action at this time.