aboutsummaryrefslogtreecommitdiffstats
path: root/src/matrix.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/matrix.js')
-rw-r--r--src/matrix.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/matrix.js b/src/matrix.js
index 786d1c1..1649370 100644
--- a/src/matrix.js
+++ b/src/matrix.js
@@ -32,6 +32,13 @@ SVG.Matrix = SVG.invent({
// Transform a matrix into another matrix by manipulating the space
transform: function (o) {
+ // Check if o is a matrix and then left multiply it directly
+ if (o.a != null) {
+ var matrix = new SVG.Matrix(o)
+ var newMatrix = this.lmultiply(matrix)
+ return newMatrix
+ }
+
// Get all of the parameters required to form the matrix
var flipX = o.flip && (o.flip === 'x' || o.flip === 'both') ? -1 : 1
var flipY = o.flip && (o.flip === 'y' || o.flip === 'both') ? -1 : 1