mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: Fixed offset calculation. Offset now passed back in uiHash.
This commit is contained in:
parent
1ca93b4a6c
commit
38c06026a1
10
ui/jquery.ui.draggable.js
vendored
10
ui/jquery.ui.draggable.js
vendored
@ -298,10 +298,10 @@ $.widget( "ui.draggable", {
|
||||
left: newLeft,
|
||||
top: newTop
|
||||
};
|
||||
|
||||
|
||||
// Refresh offset cache with new positions
|
||||
this.offset.left = this.startOffset.left + newLeft;
|
||||
this.offset.top = this.startOffset.top + newTop;
|
||||
this.offset.left = this.startOffset.left + leftDiff;
|
||||
this.offset.top = this.startOffset.top + topDiff;
|
||||
},
|
||||
|
||||
// Places draggable where mouse or user from callback indicates
|
||||
@ -333,8 +333,8 @@ $.widget( "ui.draggable", {
|
||||
|
||||
_uiHash: function( event ) {
|
||||
var ret = {
|
||||
position: this.position
|
||||
// offset: this.offset
|
||||
position: this.position,
|
||||
offset: this.offset
|
||||
};
|
||||
|
||||
if ( this.options.helper ) {
|
||||
|
Loading…
Reference in New Issue
Block a user