You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Renderer.animate(...).play() resets animation to its initial state on finish #12456
Current behavior
When Renderer.animate(...).play() is called, the animation is played back correctly, but immediately jumps to the initial state once finished. The default 'fill' : 'both' option passed into the constructor of WebAnimationsPlayer by WebAnimationsDriver has no effect due to an explicit call to this._player.reset() being performed from within WebAnimationsPlayer.destroy().
Expected behavior
Finished animations should not be reset by the destructor of WebAnimationsPlayer.
Minimal reproduction of the problem with instructions
At the end of the animation, the element jumps right back to its initial position: this._renderer.animate( element.nativeElement, { styles: [{transform : 'translate(0, 0)'}] }, [ { offset: 1, styles: { styles: [{transform : 'translate(100px, 200px)'}] } } ], 5000, 0, 'ease' ).play();
What is the motivation / use case for changing the behavior?
Since 'fill':'both' is used by WebAnimationsDriver as the default animation-fill-mode, when animation completes the target element must have its styles set to those specified in the respective end keyframe.
Please tell us about your environment:
Win10
VS Code 1.6.1
npm 3.10.3
node 6.3.1 @angular 2.1.0
AspNet.Core 1.0.1
Activity
matsko commentedon Nov 4, 2016
Turns out that this needs to be changed anyway to make web workers work with animations!
#12719
fix(animations): allow animations to be destroyed manually (#12719)
angular-automatic-lock-bot commentedon Sep 10, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.