From 1760bac1da9218315ad1bacdcf3a157495a049e8 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 2 Mar 2012 10:48:41 -0800 Subject: Fix for jumping issue when moving items that have any 3d on them. We can't translate 3d moves into 2d space due to perspective, so we must update the matrix3d values instead of the top-left values if items have 3d. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/math-utils.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'js/helper-classes/3D/math-utils.js') diff --git a/js/helper-classes/3D/math-utils.js b/js/helper-classes/3D/math-utils.js index 37044763..de63f880 100755 --- a/js/helper-classes/3D/math-utils.js +++ b/js/helper-classes/3D/math-utils.js @@ -538,6 +538,39 @@ var MathUtilsClass = exports.MathUtilsClass = Object.create(Object.prototype, { } }, + isIdentityMatrix: { + value: function( mat ) + { + if(!mat) + { + return false; + } + else + { + if(mat[0] !== 1) return false; + if(mat[1] !== 0) return false; + if(mat[2] !== 0) return false; + if(mat[3] !== 0) return false; + + if(mat[4] !== 0) return false; + if(mat[5] !== 1) return false; + if(mat[6] !== 0) return false; + if(mat[7] !== 0) return false; + + if(mat[8] !== 0) return false; + if(mat[9] !== 0) return false; + if(mat[10] !== 1) return false; + if(mat[11] !== 0) return false; + + if(mat[12] !== 0) return false; + if(mat[13] !== 0) return false; + if(mat[14] !== 0) return false; + if(mat[15] !== 1) return false; + } + return true; + } + }, + rectsOverlap: { value: function( pt, width, height, elt ) -- cgit v1.2.3