aboutsummaryrefslogtreecommitdiffstats
path: root/src/fx.js
diff options
context:
space:
mode:
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 = {}