easeljs: fix decompose return type

With no args, Matrix2D decompose returns a new object with similar
properties to a DisplayObject.

http://www.createjs.com/Docs/EaselJS/classes/Matrix2D.html#method_decompose
This commit is contained in:
Joe Schafer
2014-11-25 00:33:04 -05:00
parent 266324c29c
commit 556ecf63a5
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -77,5 +77,12 @@ function matrixDecompose() {
var matrix = new createjs.Matrix2D();
var shape = new createjs.Shape();
var transform = matrix.decompose(shape);
var transform2 = matrix.decompose();
var transformData = matrix.decompose();
shape.x = transformData.x;
shape.y = transformData.y;
shape.scaleX = transformData.scaleX;
shape.scaleY = transformData.scaleY;
shape.skewX = transformData.skewX;
shape.skewY = transformData.skewY;
shape.rotation = transformData.rotation;
}