diff options
author | wout <wout@impinc.co.uk> | 2014-08-29 12:45:21 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-08-29 12:45:21 +0200 |
commit | dd4be62e397e4db78444881eed32865f98e52582 (patch) | |
tree | c2300f62c756fde22c80f30aba66dca04602297b /src/fx.js | |
parent | 8789391f036ffded3ac919d62ee652e7cae15c5c (diff) | |
download | svg.js-dd4be62e397e4db78444881eed32865f98e52582.tar.gz svg.js-dd4be62e397e4db78444881eed32865f98e52582.zip |
Added SVG.TBox for transformed bounding boxes
Diffstat (limited to 'src/fx.js')
-rwxr-xr-x | src/fx.js | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -222,13 +222,18 @@ SVG.FX = SVG.invent({ var from = this.target.attr(a) // detect format - this.attrs[a] = a == 'transform' ? - this.target.ctm().morph(v) : - SVG.Color.isColor(v) ? - new SVG.Color(from).morph(v) : - SVG.regex.unit.test(v) ? - new SVG.Number(from).morph(v) : - { from: from, to: v } + if (a == 'transform') { + if (this.attrs[a]) + v = this.attrs[a].destination.multiply(v) + + this.attrs[a] = this.target.ctm().morph(v) + } else { + this.attrs[a] = SVG.Color.isColor(v) ? + new SVG.Color(from).morph(v) : + SVG.regex.unit.test(v) ? + new SVG.Number(from).morph(v) : + { from: from, to: v } + } } return this |