diff options
Diffstat (limited to 'js/helper-classes/3D/view-utils.js')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 919f7c50..5dc099ee 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -355,11 +355,12 @@ exports.ViewUtils = Montage.create(Component, { | |||
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 | var parent = elt.offsetParent; |
358 | while ( parent ) | 358 | while ( child ) |
359 | { | 359 | { |
360 | pt = this.childToParent( pt, child ); | 360 | pt = this.childToParent( pt, child ); |
361 | 361 | ||
362 | if (parent === this._rootElement) break; | 362 | // if (parent === this._rootElement) break; |
363 | if (child === this._stageElement) break; | ||
363 | 364 | ||
364 | child = parent; | 365 | child = parent; |
365 | parent = parent.offsetParent; | 366 | parent = parent.offsetParent; |
@@ -398,7 +399,8 @@ exports.ViewUtils = Montage.create(Component, { | |||
398 | 399 | ||
399 | // transform the bounds up the tree | 400 | // transform the bounds up the tree |
400 | var parent = child.offsetParent; | 401 | var parent = child.offsetParent; |
401 | if ( parent ) | 402 | // TODO - Should have a different way to check for new template mode |
403 | if ( parent || ((child === this.application.ninja.currentDocument.documentRoot) && (child.id !== "UserContent")) ) | ||
402 | { | 404 | { |
403 | this.setViewportObj( child ); | 405 | this.setViewportObj( child ); |
404 | 406 | ||