]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable: if cursorAt was used, revert was reverting to the wrong position (fixes...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 8 Jan 2009 13:39:58 +0000 (13:39 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 8 Jan 2009 13:39:58 +0000 (13:39 +0000)
ui/ui.draggable.js

index 913e3dedbe55444529a39a071ee526e10fc9e1c1..ccc8557afd9ef98d70c1aae9279c5e82db69da8e 100644 (file)
@@ -90,15 +90,17 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                        relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
                });
 
-               //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
-               if(o.cursorAt)
-                       this._adjustOffsetFromHelper(o.cursorAt);
+
 
                //Generate the original position
                this.originalPosition = this._generatePosition(event);
                this.originalPageX = event.pageX;
                this.originalPageY = event.pageY;
 
+               //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+               if(o.cursorAt)
+                       this._adjustOffsetFromHelper(o.cursorAt);
+
                //Set a containment if given in the options
                if(o.containment)
                        this._setContainment();