Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymer.NeonAnimationRunnerBehavior.cancelAnimation does not cancel animations #215

Open
dmitriyilin opened this issue Dec 14, 2016 · 0 comments

Comments

@dmitriyilin
Copy link

dmitriyilin commented Dec 14, 2016

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.

Skehmatics pushed a commit to Skehmatics/neon-animation that referenced this issue Dec 19, 2016
Skehmatics pushed a commit to Skehmatics/neon-animation that referenced this issue Dec 19, 2016
Skehmatics pushed a commit to Skehmatics/neon-animation that referenced this issue Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant