Skip to content

Commit

Permalink
Fix PolymerElements#215 by using _active
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Schmidt committed Dec 19, 2016
1 parent 8d94bac commit af8601b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions neon-animation-runner-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
try {
result = neonAnimation.configure(config);
// Check if we have an Effect rather than an Animation
if (typeof result.cancel != 'function') {
if (typeof result.cancel != 'function') {
result = document.timeline.play(result);
}
} catch (e) {
Expand Down Expand Up @@ -113,11 +113,13 @@
/**
* Cancels the currently running animations.
*/
cancelAnimation: function() {
for (var k in this._animations) {
this._animations[k].cancel();
cancelAnimation: function(cookie) {
for (var k in this._active) {
for (var i in this._active[k]){
this._active[k][i].animation.cancel();
}
delete this._active[k];
}
this._animations = {};
}
};

Expand Down

0 comments on commit af8601b

Please sign in to comment.