summaryrefslogtreecommitdiffstats
path: root/src/sugar.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-07-12 21:18:26 +0200
committerwout <wout@impinc.co.uk>2014-07-12 21:18:26 +0200
commit40bf2f8ecda3f426e7f13e1d891ab1ab6e004116 (patch)
treeb3d339c104c2c0e829fd5e607428a9e077619e12 /src/sugar.js
parent03f358a4d85a292c16774ba64836e0b2937df2fe (diff)
downloadsvg.js-40bf2f8ecda3f426e7f13e1d891ab1ab6e004116.tar.gz
svg.js-40bf2f8ecda3f426e7f13e1d891ab1ab6e004116.zip
Added support for scale center on matrices
Diffstat (limited to 'src/sugar.js')
-rwxr-xr-xsrc/sugar.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sugar.js b/src/sugar.js
index e759812..cf19112 100755
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -39,7 +39,9 @@ SVG.extend(SVG.Element, SVG.FX, {
}
// Scale
, scale: function(x, y, cx, cy) {
- return this.transform({ scaleX: x, scaleY: y, cx: cx, cy: cy })
+ return arguments.length == 1 || arguments.length == 3 ?
+ this.transform({ scale: x, cx: y, cy: cx }) :
+ this.transform({ scaleX: x, scaleY: y, cx: cx, cy: cy })
}
// Translate
, translate: function(x, y) {