diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/matrix.js | 2 | ||||
-rw-r--r-- | src/sugar.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/matrix.js b/src/matrix.js index 481564e..356b790 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -10,6 +10,8 @@ SVG.Matrix = SVG.invent({ stringToMatrix(source) : arguments.length == 6 ? arrayToMatrix([].slice.call(arguments)) : + Array.isArray(source) ? + arrayToMatrix(source) : typeof source === 'object' ? source : base diff --git a/src/sugar.js b/src/sugar.js index ddd4826..4110718 100644 --- a/src/sugar.js +++ b/src/sugar.js @@ -57,7 +57,7 @@ SVG.extend(SVG.Element, SVG.FX, { } // Map matrix to transform , matrix: function(m) { - return this.attr('transform', new SVG.Matrix(m)) + return this.attr('transform', new SVG.Matrix(arguments.length == 6 ? [].slice.call(arguments) : m)) } // Opacity , opacity: function(value) { |