core-elements icon indicating copy to clipboard operation
core-elements copied to clipboard

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

Open davenotik opened this issue 9 years ago • 1 comments

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 avatar Mar 02 '15 17:03 davenotik

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();

davenotik avatar Mar 02 '15 18:03 davenotik