diff options
Diffstat (limited to 'src/fx.js')
-rwxr-xr-x | src/fx.js | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 = {} |