web-animations / web-animations-js-legacy

The original emulator of the Web Animations specification. Please use web-animations-js instead:
https://github.com/web-animations/web-animations-js
Apache License 2.0
707 stars 84 forks source link

SVG transform animations fills forwards #605

Open ewilligers opened 10 years ago

ewilligers commented 10 years ago

In the following example, the scale remains in effect after the 2 seconds have passed.

  // We have a polyfill bug here: fill 'none' is not being respected.
  element.animate([{transform: 'scale(1)'}, {transform: 'scale(3)'}], {duration: 2000, fill: 'none'});

This observed faulty behavior can be avoided by noting that transform is an SVG attribute; it must be added to svgProperties.

ewilligers commented 10 years ago

My commit was reverted as it caused a Travis failure in Firefox.