summaryrefslogtreecommitdiffstats
path: root/src/fx.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/fx.js')
-rwxr-xr-xsrc/fx.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fx.js b/src/fx.js
index 754b09b..402bdbd 100755
--- a/src/fx.js
+++ b/src/fx.js
@@ -190,10 +190,10 @@ SVG.FX = SVG.invent({
}
} else {
- requestAnimFrame(fx.render)
+ fx.animationFrame = requestAnimationFrame(fx.render)
}
} else {
- requestAnimFrame(fx.render)
+ fx.animationFrame = requestAnimationFrame(fx.render)
}
}
@@ -390,6 +390,7 @@ SVG.FX = SVG.invent({
} else {
// stop current animation
clearTimeout(this.timeout)
+ cancelAnimationFrame(this.animationFrame);
// reset storage for properties
this.attrs = {}