r989 - trunk/ui

r989 - trunk/ui


Author: paul.bakaus
Date: Fri Nov 21 06:01:44 2008
New Revision: 989
Modified:
trunk/ui/ui.draggable.js
Log:
draggable: the snap events 'release' and 'snap' now both have valid
mousemove events attached.
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js    (original)
+++ trunk/ui/ui.draggable.js    Fri Nov 21 06:01:44 2008
@@ -625,7 +625,7 @@
            //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 @@
            }
            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);
        };