From 521df0ed9242efff45715998837068c87aca7efd Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 13 Apr 2012 11:12:40 -0700 Subject: 3D Rotate changes --- js/helper-classes/3D/draw-utils.js | 48 +++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index c7c1c08d..a200268e 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -774,13 +774,14 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { else { // get the plane from the first element to compare against the other elements + var dot; var flat = true; - var plane = this.viewUtils.getElementPlane( eltArray[0] ); + var plane = this.viewUtils.getUnprojectedElementPlane( eltArray[0] ); for (i=1; i 0) || (back > 0)) ? dark : light; context.beginPath(); if ((right > 0) || (back > 0)) { context.beginPath(); - p = this.viewUtils.localToGlobal2( [x1, y0, z0], ssMat ); context.moveTo( p[0], p[1] ); + p = this.viewUtils.localToGlobal2( [x1, y0, z0], ssMat ); context.moveTo( p[0], p[1] ); p = this.viewUtils.localToGlobal2( [x1, y1, z0], ssMat ); context.lineTo( p[0], p[1] ); context.closePath(); context.stroke(); } -- cgit v1.2.3 From 7b3ef287f248c07602aefa3ba2cc907e0d16493a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 18 Apr 2012 13:42:18 -0700 Subject: Fixing some more merge issues. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 42e0cfa9..039f5bb3 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -796,7 +796,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { context.stroke(); this._selectionCtr = MathUtils.getCenterFromBounds(3, bounds3D); - console.log("selection center, single elt case - ", this._selectionCtr); +// console.log("selection center, single elt case - ", this._selectionCtr); this.viewUtils.popViewportObj(); } @@ -837,7 +837,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { if (MathUtils.fpCmp(dot, 1) != 0) flat = false; } - console.log( "drawSelectionBounds, flat: " + flat ); +// console.log( "drawSelectionBounds, flat: " + flat ); // if all the elements share the same plane, draw the 2D rectangle if (flat) -- cgit v1.2.3