summaryrefslogtreecommitdiffstats
path: root/src/fx.js
diff options
context:
space:
mode:
authorRémi Tétreault <tetreault.remi@gmail.com>2016-10-15 02:33:05 -0400
committerRémi Tétreault <tetreault.remi@gmail.com>2016-10-15 02:33:05 -0400
commit8cfd7558024f0cc0b22dddbd20c7eae92acb6a52 (patch)
tree92d625a0828c937734a02ba0b0c417e8f4a6e664 /src/fx.js
parent6f4fd728afa6c3b590ae094b5d9e7ed716075b73 (diff)
downloadsvg.js-8cfd7558024f0cc0b22dddbd20c7eae92acb6a52.tar.gz
svg.js-8cfd7558024f0cc0b22dddbd20c7eae92acb6a52.zip
Make SVG.FX.loop modify the last situation instead of the current one
Diffstat (limited to 'src/fx.js')
-rw-r--r--src/fx.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fx.js b/src/fx.js
index 9238e2b..3756396 100644
--- a/src/fx.js
+++ b/src/fx.js
@@ -341,10 +341,12 @@ SVG.FX = SVG.invent({
}
// Make loopable
, loop: function(times, reverse) {
+ var c = this.last()
+
// store current loop and total loops
- this.situation.loop = this.situation.loops = times || true
+ c.loop = c.loops = times || true
- if(reverse) this.last().reversing = true
+ if(reverse) c.reversing = true
return this
}
@@ -818,4 +820,4 @@ SVG.extend(SVG.FX, {
return this
}
-}) \ No newline at end of file
+})