Open Wilto opened 13 years ago
Hey mate thanks for looking into addressing the clunky animations. The drag-and-snap is awesome. I can't wait to see this. Performance is reasonable on iPad 2 and iPhone 4 without HW accel, but it'd surely be an awesome addition too. :-) Thanks man!
So, now that we have a cool drag-and-snap thing going on, the next step is declunkifying (a word) the animations. The issue here is that I’m using margin-left which—while easy to deal with in terms of calculation and styling—means everything in the slider is being redrawn constantly whenever the value changes.
The plan is to swap this for CSS transforms where possible (falling back to negative margins in browsers that don’t support transforms), so we can take advantage of hardware acceleration. I’ve done a little testing and it makes a very noticeable difference, but it’s going to require some tweaking to how I’m calculating things. I have a hunch this may address the WebKit rounding bug some people are seeing, as well.