diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2010-03-11 16:35:20 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2010-03-11 16:35:20 +0000 |
commit | 1a487a18b725b46522b7ed24c261c69d81fcb005 (patch) | |
tree | 6dbfd25c82f76d7eafe5c815b23fe073b0763bbd /ui | |
parent | 7799b4ecf9578a9ab059fb13bbfd2c4975862124 (diff) | |
download | jquery-ui-1a487a18b725b46522b7ed24c261c69d81fcb005.tar.gz jquery-ui-1a487a18b725b46522b7ed24c261c69d81fcb005.zip |
sortable: fixed #5322 (helper position weird when axis was used, fixes sortable tabs demo)
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.sortable.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index d29e708e8..6b2573431 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -270,8 +270,8 @@ $.widget("ui.sortable", $.ui.mouse, { this.positionAbs = this._convertPositionTo("absolute"); //Set the helper position - if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; - if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + this.helper[0].style.left = this.options.axis == "y" ? this.originalPosition.left+'px' : this.position.left+'px'; + this.helper[0].style.top = this.options.axis == "x" ? this.originalPosition.top+'px' : this.position.top+'px'; //Rearrange for (var i = this.items.length - 1; i >= 0; i--) { |