diff options
author | Rémi Tétreault <tetreault.remi@gmail.com> | 2016-10-17 14:15:18 -0400 |
---|---|---|
committer | Rémi Tétreault <tetreault.remi@gmail.com> | 2016-10-17 14:15:18 -0400 |
commit | 91d4934ca6d83792aae8bbebc900e69f9f4df205 (patch) | |
tree | cb6ee33c0cc68c786c7f505fed666637348c3853 /src/fx.js | |
parent | a6261cda9dd9d030157333ba4f001e088e535c29 (diff) | |
download | svg.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.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |