From 8cfd7558024f0cc0b22dddbd20c7eae92acb6a52 Mon Sep 17 00:00:00 2001 From: Rémi Tétreault Date: Sat, 15 Oct 2016 02:33:05 -0400 Subject: Make SVG.FX.loop modify the last situation instead of the current one --- src/fx.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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 +}) -- cgit v1.2.3