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.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js
index 919f7c50..8c338f84 100755
--- a/js/helper-classes/3D/view-utils.js
+++ b/js/helper-classes/3D/view-utils.js
@@ -354,15 +354,17 @@ exports.ViewUtils = Montage.create(Component, {
354 354
355 // transform the bounds up the tree 355 // transform the bounds up the tree
356 var child = elt; 356 var child = elt;
357 var parent = elt.offsetParent; 357 while ( child )
358 while ( parent )
359 { 358 {
360 pt = this.childToParent( pt, child ); 359 pt = this.childToParent( pt, child );
361 360
362 if (parent === this._rootElement) break; 361// if (child === this._stageElement) break;
362// child = child.offsetParent;
363 363
364 child = parent; 364 if (child === this._stageElement) break;
365 parent = parent.offsetParent; 365 if (child === this._rootElement) break;
366 child = child.offsetParent;
367 if (child === this._rootElement) break;
366 } 368 }
367 369
368 ///////////////////////////////////////////////////////// 370 /////////////////////////////////////////////////////////
@@ -398,7 +400,8 @@ exports.ViewUtils = Montage.create(Component, {
398 400
399 // transform the bounds up the tree 401 // transform the bounds up the tree
400 var parent = child.offsetParent; 402 var parent = child.offsetParent;
401 if ( parent ) 403 // TODO - Should have a different way to check for new template mode
404 if ( parent || ((child === this.application.ninja.currentDocument.documentRoot) && (child.id !== "UserContent")) )
402 { 405 {
403 this.setViewportObj( child ); 406 this.setViewportObj( child );
404 407