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
8
ui/jquery.ui.draggable.js
vendored
8
ui/jquery.ui.draggable.js
vendored
@ -300,8 +300,8 @@ $.widget( "ui.draggable", {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Refresh offset cache with new positions
|
// Refresh offset cache with new positions
|
||||||
this.offset.left = this.startOffset.left + newLeft;
|
this.offset.left = this.startOffset.left + leftDiff;
|
||||||
this.offset.top = this.startOffset.top + newTop;
|
this.offset.top = this.startOffset.top + topDiff;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Places draggable where mouse or user from callback indicates
|
// Places draggable where mouse or user from callback indicates
|
||||||
@ -333,8 +333,8 @@ $.widget( "ui.draggable", {
|
|||||||
|
|
||||||
_uiHash: function( event ) {
|
_uiHash: function( event ) {
|
||||||
var ret = {
|
var ret = {
|
||||||
position: this.position
|
position: this.position,
|
||||||
// offset: this.offset
|
offset: this.offset
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( this.options.helper ) {
|
if ( this.options.helper ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user