Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 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 @@ -114,10 +114,12 @@
* Cancels the currently running animations.
*/
cancelAnimation: function() {
for (var k in this._animations) {
this._animations[k].cancel();
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