Closed NetanelBasal closed 9 years ago
I've actually considered this but since I couldn't find many interesting use cases, I've decided to pass. Thanks anyway!
Hi.
I find an interesting use case for this. When building Sticky Elements, I found an issue where I want to "pause" an animation on mouseover
for example. Then on mouseleave
, animation resumes from its actual position, not from the beginning. I can use getComputedStyle
to retrieve transform values, but it forces a reflow/repaint so I'm trying to avoid that.
A step
or each
callback returning actual transforms and values would be really helpful. This way, I could update the DOM accordingly (I know the DOM is slow too)
I've already tested that and it seems to work pretty well.
You can add a step callback function like $ does, A function to be called for each animated property of each animated element.