bendc / animateplus

A+ animation module for the modern web
MIT License
5.96k stars 280 forks source link

complete callback called before the animation is over #20

Closed MatBdry closed 8 years ago

MatBdry commented 8 years ago

Hello,

I have an issue when a try to execute a method in the complete callback (on Chrome). It seems the callback is called before the animation is over. Here is an example: https://jsfiddle.net/tvh7qc37/7/. If you open the console, you will see that the code is stopped by the debugger before the animation is over.

thank you for your help !

bendc commented 8 years ago

I'm not entirely sure how debugger works as I never rely on it, but I'm pretty sure the complete callback is always called after the animation. You can try replacing your debugger statement with something like console.log(document.querySelector(".foreground").style.transform) and you'll always get scale(0).