aboutsummaryrefslogtreecommitdiffstats
path: root/src/fx.js
diff options
context:
space:
mode:
authorRémi Tétreault <tetreault.remi@gmail.com>2016-10-17 14:15:18 -0400
committerRémi Tétreault <tetreault.remi@gmail.com>2016-10-17 14:15:18 -0400
commit91d4934ca6d83792aae8bbebc900e69f9f4df205 (patch)
treecb6ee33c0cc68c786c7f505fed666637348c3853 /src/fx.js
parenta6261cda9dd9d030157333ba4f001e088e535c29 (diff)
downloadsvg.js-91d4934ca6d83792aae8bbebc900e69f9f4df205.tar.gz
svg.js-91d4934ca6d83792aae8bbebc900e69f9f4df205.zip
Make speed(0) pause the animation
Diffstat (limited to 'src/fx.js')
-rw-r--r--src/fx.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fx.js b/src/fx.js
index 1fcf4bc..fc05284 100644
--- a/src/fx.js
+++ b/src/fx.js
@@ -337,6 +337,8 @@ SVG.FX = SVG.invent({
// set/get the speed of the animation
, speed: function(spd){
+ if (spd === 0) return this.pause()
+
if (spd) {
this.spd = spd
return this.at(this.situation.reversed ? 1-this.pos : this.pos)