Draggable: Fixed offset calculation. Offset now passed back in uiHash.

This commit is contained in:
Dave Stein 2011-11-13 17:14:19 -05:00
parent 1ca93b4a6c
commit 38c06026a1

View File

@ -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 ) {