Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Animator does not correctly parse transition durations with multiple values #2373

Closed
jonrimmer opened this issue Apr 11, 2013 · 1 comment
Closed

Comments

@jonrimmer
Copy link

In order to determine the correct length of time to play a CSS-transition-based animation, animator.js attempts to parse the value of the transition-duration property of the element's computed style to a float value. However, it fails to account for cases where multiple transitions are specified. For example: transition-duration: 0.2s, 0.5s, 1s. Only the first value is parsed, which may be shorter than one or more than the others.

The result will be that the animation finishes before the transition is completed. If some action, such a DOM removal, is scheduled to take place after, it will result in the animation being cut off before it is completed.

cburgdorf added a commit to cburgdorf/angular.js that referenced this issue May 2, 2013
In case multiple durations are specified like so:

 transition-duration: 0.5s, 3000ms;
 transition-property: left, height;

The animator will pick the longest duration.

Fixes angular#2373
@cburgdorf
Copy link
Contributor

This is fixed in master and can be closed. @petebacondarwin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants