kenwheeler/slick — pull request #316 by tomas-mikelskas (2014-06-19 07:17:22+00:00)
Title: record dragging state on Slick object instead of css class

Currently dragging state is recorded as a css class on ``.slick-list``. The problem with this is that adding/removing this class causes huge performance problems while scrolling (on mobile devices) on slides that have a lot of DOM elements. My hunch is that it triggers reflow on all nested DOM elements.

This pull request remedies the problem by recording state on the Slick object. The only caveat is that there are some styles applied when ``.slick-list`` has ``.dragging`` class. So these are lost, but in my case performance is more important.

If you think the lost styles are critical, maybe style definitions could be added via javascript on dom elements that need them. Hopefully that would not trigger reflow.

I'm happy to update the pull request if you think it's worth while.

Kudos for the great library.