aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/view-utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-xjs/helper-classes/3D/view-utils.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js
index 75530af3..0080bf90 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -143,14 +143,6 @@ exports.ViewUtils = Montage.create(Component, {
143 viewDir = MathUtils.transformVector( [0,0,1], stageInv ); 143 viewDir = MathUtils.transformVector( [0,0,1], stageInv );
144 } 144 }
145 145
146 /*
147 if (elt === stage)
148 {
149 xVec = [1,0,0];
150 yVec = [0,1,0];
151 }
152 */
153
154 var plane; 146 var plane;
155 var xDot, yDot, zDot; 147 var xDot, yDot, zDot;
156 switch (axis) 148 switch (axis)
@@ -275,6 +267,11 @@ exports.ViewUtils = Montage.create(Component, {
275 value: function( localPt, elt ) { 267 value: function( localPt, elt ) {
276 this.pushViewportObj( elt ); 268 this.pushViewportObj( elt );
277 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); 269 var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] );
270 if ((elt == null) || (elt === this._stageElement))
271 {
272 this.popViewportObj();
273 return viewPt;
274 }
278 var mat = this.getMatrixFromElement( elt ); 275 var mat = this.getMatrixFromElement( elt );
279 var worldPt = MathUtils.transformPoint( viewPt, mat ); 276 var worldPt = MathUtils.transformPoint( viewPt, mat );
280 var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); 277 var stageWorldPt = this.postViewToStageWorld( worldPt, elt );