Skip to content

Polymer.NeonAnimationRunnerBehavior.cancelAnimation does not cancel animations #215

@dmitriyilin

Description

@dmitriyilin

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions