Skip to content

Commit 8933815

Browse files
author
Paul Bakaus
committed
draggable: if cursorAt was used, revert was reverting to the wrong position (fixes #3699)
1 parent 779523c commit 8933815

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

ui/ui.draggable.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,17 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
9090
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
9191
});
9292

93-
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
94-
if(o.cursorAt)
95-
this._adjustOffsetFromHelper(o.cursorAt);
93+
9694

9795
//Generate the original position
9896
this.originalPosition = this._generatePosition(event);
9997
this.originalPageX = event.pageX;
10098
this.originalPageY = event.pageY;
10199

100+
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
101+
if(o.cursorAt)
102+
this._adjustOffsetFromHelper(o.cursorAt);
103+
102104
//Set a containment if given in the options
103105
if(o.containment)
104106
this._setContainment();

0 commit comments

Comments
 (0)