diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sortable.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/sortable.js b/ui/sortable.js index 0207c8620..913949c20 100644 --- a/ui/sortable.js +++ b/ui/sortable.js @@ -77,17 +77,12 @@ return $.widget("ui.sortable", $.ui.mouse, { }, _create: function() { - - var o = this.options; this.containerCache = {}; this.element.addClass("ui-sortable"); //Get the items this.refresh(); - //Let's determine if the items are being displayed horizontally - this.floating = this.items.length ? o.axis === "x" || this._isFloating(this.items[0].item) : false; - //Let's determine the parent's offset this.offset = this.element.offset(); @@ -731,6 +726,11 @@ return $.widget("ui.sortable", $.ui.mouse, { refreshPositions: function(fast) { + // Determine whether items are being displayed horizontally + this.floating = this.items.length ? + this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : + false; + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change if(this.offsetParent && this.helper) { this.offset.parent = this._getParentOffset(); |