-
Couldn't load subscription status.
- Fork 85
Description
For example I had an animation with iterations: Infinite, or I had an animation I was manually retriggering, but now I no longer need it.
I assume I should indicate that the animation is no longer wanted by doing:
animation.player.cancel();
But I am experiencing two issues:
- The style properties are still being written on each tick by
applyAnimatedValues()because they are still listed in_animProperties. - Even when all the animations are cancelled, the element's
stylehas been masked by anAnimatedCSSStyleDeclarationand if I write style properties, they are not set in the DOM because they are still listed inisAffectedProperty.
(For the first case, I experimented with clearing inactive targets from the Compositor, but this is not complete: I still have to call _deregisterFromTimeline() myself.)
Should we be trying to cleanup _animProperties and isAffectedProperty when an animation is cancelled? (There is already a TODO that mentions we should try to cleanup the global PLAYERS list.)
I wonder if isAffectedProperty is redundant, given the existence of _animProperties. Is there any reason we can't peek at target._animProperties when we want to determine if a property is affected?