Skip to main content

Search and Top Navigation

#15039 new bug ()

Opened September 01, 2016 08:30PM UTC

Last modified September 01, 2016 08:36PM UTC

Sortable: Draggig list items over items that are display: none causes a lag

Reported by: kkotwal94 Owned by:
Priority: minor Milestone: none
Component: ui.sortable Version: 1.12.0
Keywords: Cc:
Blocked by: Blocking:
Description

Theres a lot of lag when you try to drag items over items that have the property Display:none

EDIT: code snippet removed

Here's the post revolving this issue: http://stackoverflow.com/questions/9440664/jquery-ui-sortable-drag-initiation-is-slow-when-container-has-hidden-items

Attachments (0)
Change History (1)

Changed September 01, 2016 08:36PM UTC by scottgonzalez comment:1

description: Theres a shit ton of lag when you try to drag items over items that have the property Display:none \ \ \ {{{ \ 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(); \ } \ \ var i, item, t, p; \ \ for ( i = this.items.length - 1; i >= 0; i-- ) { \ item = this.items[ i ]; \ \ //We ignore calculating positions of all connected containers when we're not over them \ if ( item.instance !== this.currentContainer && this.currentContainer && \ item.item[ 0 ] !== this.currentItem[ 0 ] ) { \ continue; \ } \ \ t = this.options.toleranceElement ? \ $( this.options.toleranceElement, item.item ) : \ item.item; \ \ if (!fast) { \ if(item.item.css('display') === 'none') { \ item.width = 0; \ item.height = 0; \ } \ else { \ item.width = t.outerWidth(); \ item.height = t.outerHeight(); \ } \ } \ \ p = t.offset(); \ item.left = p.left; \ item.top = p.top; \ } \ }}} \ \ \ Here's the post revolving this issue: http://stackoverflow.com/questions/9440664/jquery-ui-sortable-drag-initiation-is-slow-when-container-has-hidden-items \ Theres a lot of lag when you try to drag items over items that have the property Display:none \ \ EDIT: code snippet removed \ \ Here's the post revolving this issue: http://stackoverflow.com/questions/9440664/jquery-ui-sortable-drag-initiation-is-slow-when-container-has-hidden-items \
summary: Dragging Sortable list items over items that are Display:None LagSortable: Draggig list items over items that are display: none causes a lag