flackr / scroll-timeline

A polyfill of ScrollTimeline.
Apache License 2.0
891 stars 84 forks source link

Auto align start time before checking if animation is ready #190

Closed johannesodland closed 6 months ago

johannesodland commented 6 months ago

Run the auto align start time procedure before checking if animation is ready.

Currently we run the procedure when ticking animations after adding animations to a timeline or after a scroll or resize event. However, this does not update the start time when playing or pausing an existing animation.

If we don't run the procedure here, tests can time out under some conditions, as the animation will never be ready. This can happen in the play-animation test.

No tests should be affected by this PR, but fixing this is a precondition for fixing other issues.