Skip to content

Commit 4b80102

Browse files
committed
Merge pull request niklasvh#545 from cornedor/ie-transforms
Transform matrix for IE
2 parents c2baf42 + 9201cf7 commit 4b80102

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/nodecontainer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ NodeContainer.prototype.getValue = function() {
258258
return value.length === 0 ? (this.node.placeholder || "") : value;
259259
};
260260

261-
NodeContainer.prototype.MATRIX_PROPERTY = /(matrix)\((.+)\)/;
261+
NodeContainer.prototype.MATRIX_PROPERTY = /(matrix|matrix3d)\((.+)\)/;
262262
NodeContainer.prototype.TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;
263263
NodeContainer.prototype.TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;
264264
NodeContainer.prototype.CLIP = /^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/;
@@ -273,6 +273,11 @@ function parseMatrix(match) {
273273
return match[2].split(",").map(function(s) {
274274
return parseFloat(s.trim());
275275
});
276+
} else if (match && match[1] === "matrix3d") {
277+
var matrix3d = match[2].split(",").map(function(s) {
278+
return parseFloat(s.trim());
279+
});
280+
return [matrix3d[0], matrix3d[1], matrix3d[4], matrix3d[5], matrix3d[12], matrix3d[13]];
276281
}
277282
}
278283

0 commit comments

Comments
 (0)