diff options
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
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, { | |||
288 | value: function( localPt, elt ) { | 288 | value: function( localPt, elt ) { |
289 | this.pushViewportObj( elt ); | 289 | this.pushViewportObj( elt ); |
290 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); | 290 | var viewPt = this.screenToView( localPt[0], localPt[1], localPt[2] ); |
291 | if ((elt == null) || (elt === this._stageElement)) | ||
292 | { | ||
293 | this.popViewportObj(); | ||
294 | return viewPt; | ||
295 | } | ||
291 | var mat = this.getMatrixFromElement( elt ); | 296 | var mat = this.getMatrixFromElement( elt ); |
292 | var worldPt = MathUtils.transformPoint( viewPt, mat ); | 297 | var worldPt = MathUtils.transformPoint( viewPt, mat ); |
293 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); | 298 | var stageWorldPt = this.postViewToStageWorld( worldPt, elt ); |