aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRémi Tétreault <tetreault.remi@gmail.com>2017-04-30 15:14:11 -0400
committerRémi Tétreault <tetreault.remi@gmail.com>2017-04-30 15:14:11 -0400
commit0ba5e1f394911c66441ea770e09338e82fb6ef49 (patch)
treedf6c225df194a9292803ca2d57b98debfb8368da /src
parent4204181064ab17c82fc0cde227a84e31512d6973 (diff)
downloadsvg.js-0ba5e1f394911c66441ea770e09338e82fb6ef49.tar.gz
svg.js-0ba5e1f394911c66441ea770e09338e82fb6ef49.zip
fixed `SVG.FX.once` so that it add its callback on the last situation instead of the current one
Diffstat (limited to 'src')
-rw-r--r--src/fx.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fx.js b/src/fx.js
index f9fbbc7..a4d0ecd 100644
--- a/src/fx.js
+++ b/src/fx.js
@@ -660,10 +660,10 @@ SVG.FX = SVG.invent({
// adds an once-callback which is called at a specific position and never again
, once: function(pos, fn, isEased){
+ var c = this.last()
+ if(!isEased) pos = c.ease(pos)
- if(!isEased)pos = this.situation.ease(pos)
-
- this.situation.once[pos] = fn
+ c.once[pos] = fn
return this
}