diff options
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 13 |
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 919f7c50..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, { | |||
156 | viewDir = MathUtils.transformVector( [0,0,1], stageInv ); | 156 | viewDir = MathUtils.transformVector( [0,0,1], stageInv ); |
157 | } | 157 | } |
158 | 158 | ||
159 | /* | ||
160 | if (elt === stage) | ||
161 | { | ||
162 | xVec = [1,0,0]; | ||
163 | yVec = [0,1,0]; | ||
164 | } | ||
165 | */ | ||
166 | |||
167 | var plane; | 159 | var plane; |
168 | var xDot, yDot, zDot; | 160 | var xDot, yDot, zDot; |
169 | switch (axis) | 161 | switch (axis) |
@@ -288,6 +280,11 @@ exports.ViewUtils = Montage.create(Component, { | |||
288 | value: function( localPt, elt ) { | 280 | value: function( localPt, elt ) { |
289 | this.pushViewportObj( elt ); | 281 | this.pushViewportObj( elt ); |
290 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); | 282 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); |
283 | if ((elt == null) || (elt === this._stageElement)) | ||
284 | { | ||
285 | this.popViewportObj(); | ||
286 | return viewPt; | ||
287 | } | ||
291 | var mat = this.getMatrixFromElement( elt ); | 288 | var mat = this.getMatrixFromElement( elt ); |
292 | var worldPt = MathUtils.transformPoint( viewPt, mat ); | 289 | var worldPt = MathUtils.transformPoint( viewPt, mat ); |
293 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); | 290 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); |