Polymer.NeonAnimationRunnerBehavior.cancelAnimation does not cancel currently active animations
Please refer to the code snippet from the 2.0-preview branch:
/**
* Plays an animation with an optional `type`.
* @param {string=} type
* @param {!Object=} cookie
*/
playAnimation: function(type, cookie) {
var configs = this.getAnimationConfig(type);
if (!configs) {
return;
}
this._active = this._active || {};
if (this._active[type]) {
...
/**
* Cancels the currently running animations.
*/
cancelAnimation: function() {
for (var k in this._animations) {
this._animations[k].cancel();
}
this._animations = {};
}
The reason may be that due to some changes _animations is gone now. Therefore, _active should be used to cancel animations.
Description
Polymer.NeonAnimationRunnerBehavior.cancelAnimation does not cancel currently active animations
Please refer to the code snippet from the 2.0-preview branch:
...
The reason may be that due to some changes _animations is gone now. Therefore, _active should be used to cancel animations.