Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

core-animation doesn't seem to respect the "Infinity" duration #196

Open
davenotik opened this issue Mar 2, 2015 · 1 comment
Open

core-animation doesn't seem to respect the "Infinity" duration #196

davenotik opened this issue Mar 2, 2015 · 1 comment

Comments

@davenotik
Copy link
Contributor

A duration of, say, 2000 works fine. But "Infinity" does not.

https://github.com/dart-lang/core-elements/blob/master/lib/src/core-animation/core-animation.html#L135

@davenotik
Copy link
Contributor Author

Never mind! I had it wrong. What I wanted was iterations, not duration. If I set duration to Infinity that meant that the change (color change in my case) would take forever, i.e. never happen. What I wanted was:

HtmlElement t = e.target;
    var animation = new CoreAnimation();
    animation.duration = "500";
    animation.iterations = "Infinity";
    animation.keyframes = [
        {'background-color': 'blue'},
        {'background-color': 'white'}
    ];
    animation.target = t;
    animation.play();

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

No branches or pull requests

1 participant