daniel-lundin / snabbt.js

Fast animations with javascript and CSS transforms
http://daniel-lundin.github.io/snabbt.js/
MIT License
5.21k stars 331 forks source link

Animations continuing after they should be stopped. #44

Closed kevbost closed 9 years ago

kevbost commented 9 years ago

I'm not sure what's causing this, but it seems that if I run different snabbts(?) on the same DOM element in succession, calling 'stop' will reset the element for a moment, but it will then continue running the stopped animation. It could be that I'm not stopping it correctly but it acts more like a bug.

This is the app I made to play with snabbt ( http://kevbost.github.io/kb-meetup-snabbt ) that I'm going to present at our local JS meetup. The Rotate!! button is the culprit I think, it has loop: Infinity set on the animation. It's mostly based around your cards.js doc example.

PS: I'm really loving snabbt. It's useful but most importantly fun to use. Keep up the good work!

KB

daniel-lundin commented 9 years ago

Really cool demo! And nice catch, animations could not be stopped after the first loop. I just published a new release, so this should be fixed now. (0.4.0)

I also found another bug by looking at your demo(not in the demo, the lib). When you go from rotate X and Y axis to just rotate for example, it looks fine until the looping starts. It then restarts from where the previous animation was interrupted. Didn't have time to fix this in this release, but will try to fix it for the next.

kevbost commented 9 years ago

Indeed it does! I assumed it was part of the same issue. Looking forward to more progress, it's a lot of fun to use.