aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-02 10:48:41 -0800
committerNivesh Rajbhandari2012-03-02 10:48:41 -0800
commit1760bac1da9218315ad1bacdcf3a157495a049e8 (patch)
tree2a35f1b50af9f7452203b0693d9ac511e435ac7d /js/helper-classes
parent2c04935f0ccb1cb7c98371fc10b43155f2d956c4 (diff)
downloadninja-1760bac1da9218315ad1bacdcf3a157495a049e8.tar.gz
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 <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/math-utils.js33
1 files changed, 33 insertions, 0 deletions
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, {
538 } 538 }
539 }, 539 },
540 540
541 isIdentityMatrix: {
542 value: function( mat )
543 {
544 if(!mat)
545 {
546 return false;
547 }
548 else
549 {
550 if(mat[0] !== 1) return false;
551 if(mat[1] !== 0) return false;
552 if(mat[2] !== 0) return false;
553 if(mat[3] !== 0) return false;
554
555 if(mat[4] !== 0) return false;
556 if(mat[5] !== 1) return false;
557 if(mat[6] !== 0) return false;
558 if(mat[7] !== 0) return false;
559
560 if(mat[8] !== 0) return false;
561 if(mat[9] !== 0) return false;
562 if(mat[10] !== 1) return false;
563 if(mat[11] !== 0) return false;
564
565 if(mat[12] !== 0) return false;
566 if(mat[13] !== 0) return false;
567 if(mat[14] !== 0) return false;
568 if(mat[15] !== 1) return false;
569 }
570 return true;
571 }
572 },
573
541 rectsOverlap: 574 rectsOverlap:
542 { 575 {
543 value: function( pt, width, height, elt ) 576 value: function( pt, width, height, elt )