aboutsummaryrefslogtreecommitdiffstats
path: root/src/fx.js
diff options
context:
space:
mode:
authorgschutz <guilherme@gschutz.com>2015-05-18 15:51:40 -0300
committergschutz <guilherme@gschutz.com>2015-05-18 15:55:16 -0300
commit76a236a54c1e9b8457d9b13820fd6fa678df95dd (patch)
treeae4b22f4430661df83bd29a27098f28a9fe65caf /src/fx.js
parent54b3f3f1aab6204624189b5ef04b7ea30125a455 (diff)
parent0d1e85f6e3953461808c70366528c2ac3ce7903b (diff)
downloadsvg.js-76a236a54c1e9b8457d9b13820fd6fa678df95dd.tar.gz
svg.js-76a236a54c1e9b8457d9b13820fd6fa678df95dd.zip
Merge remote-tracking branch 'upstream/master' generate the build
Diffstat (limited to 'src/fx.js')
-rwxr-xr-xsrc/fx.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fx.js b/src/fx.js
index 2b983c3..6dceb2a 100755
--- a/src/fx.js
+++ b/src/fx.js
@@ -186,10 +186,10 @@ SVG.FX = SVG.invent({
}
} else {
- requestAnimFrame(fx.render)
+ fx.animationFrame = requestAnimationFrame(fx.render)
}
} else {
- requestAnimFrame(fx.render)
+ fx.animationFrame = requestAnimationFrame(fx.render)
}
}
@@ -233,6 +233,13 @@ SVG.FX = SVG.invent({
/* dlete matrixstring from object */
delete o.matrix
+ /* add rotation-center to transformations */
+ this.target.trans.cx = o.cx || null
+ this.target.trans.cy = o.cy || null
+
+ delete o.cx
+ delete o.cy
+
/* store matrix values */
for (v in o)
this.trans[v] = { from: this.target.trans[v], to: o[v] }
@@ -377,6 +384,7 @@ SVG.FX = SVG.invent({
} else {
/* stop current animation */
clearTimeout(this.timeout)
+ cancelAnimationFrame(this.animationFrame);
/* reset storage for properties that need animation */
this.attrs = {}