From babfa5f1ca4f702920d81d7e12a90b12ffbf42d8 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Thu, 10 May 2012 16:53:18 -0700 Subject: Fixed an inaccuracy snapping to the stage. --- js/helper-classes/3D/view-utils.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/helper-classes/3D/view-utils.js') diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 919f7c50..48d4cacf 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -288,6 +288,11 @@ exports.ViewUtils = Montage.create(Component, { value: function( localPt, elt ) { this.pushViewportObj( elt ); var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); + if ((elt == null) || (elt === this._stageElement)) + { + this.popViewportObj(); + return viewPt; + } var mat = this.getMatrixFromElement( elt ); var worldPt = MathUtils.transformPoint( viewPt, mat ); var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); -- cgit v1.2.3 From 904c7bfb65bb04400a0f63af1156cd9341958935 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Mon, 14 May 2012 15:11:22 -0700 Subject: Drag plane not being set. Injection from a recent checkin of mine. --- js/helper-classes/3D/view-utils.js | 8 -------- 1 file changed, 8 deletions(-) (limited to 'js/helper-classes/3D/view-utils.js') diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 48d4cacf..00124900 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -156,14 +156,6 @@ exports.ViewUtils = Montage.create(Component, { viewDir = MathUtils.transformVector( [0,0,1], stageInv ); } - /* - if (elt === stage) - { - xVec = [1,0,0]; - yVec = [0,1,0]; - } - */ - var plane; var xDot, yDot, zDot; switch (axis) -- cgit v1.2.3