Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Only Start if not Disabled #436

Closed
wants to merge 1 commit into from

Conversation

michaschwab
Copy link

Unfortunately, jquery ui sortable is very slow sometimes, specially if there are hidden elements as described here: http://stackoverflow.com/questions/9440664/jquery-ui-sortable-drag-initiation-is-slow-when-container-has-hidden-items

This adds up to more than 150ms for me on every user action, which is absolutely inacceptable, because I only need to use ui-sortable in very few cases. I need to be able to disable it.

Right now, it is not possible to hold off on launching ui sortable, similar to the problem discussed here: #397
Unfortunately, disabling jquery ui sortable only prevents the dragging from working, without actually not running. It still does all the expensive calls to the refreshPositions function.

All I need is to hold off before the start if the disabled option is set. My change is only about 7 lines - I wrapped the executed code into a "main" function, and only call that function if disabled is not set. The diff below is misleading.

I really hope this, or a different solution, can make it into the main rep. Thanks!

…the disabled option is removed, ui sortable will launch.
@thgreasi
Copy link
Contributor

Can you fix the travis errors and open a new PR against the v0.14 branch? I
can get some time to review this and add some tests during the weekend.

Thodoris Greasidis
Computer, Networking &
Communications Engineer

@thgreasi
Copy link
Contributor

Merged in v0.14.x-dev branch with #444.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants