From 8f8f7f9a36fb9abadea2a9f25aef0084946bebc9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 14:42:00 -0700 Subject: Removed special-casing for new template workflow. Instead, we will enforce a width and height on the body in order to do 3d. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/view-utils.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js/helper-classes/3D/view-utils.js') diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 40a19b90..36d6f8c4 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -309,11 +309,12 @@ exports.ViewUtils = Montage.create(Component, { // transform the bounds up the tree var child = elt; var parent = elt.offsetParent; - while ( parent ) + while ( child ) { pt = this.childToParent( pt, child ); - if (parent === this._rootElement) break; +// if (parent === this._rootElement) break; + if (child === this._stageElement) break; child = parent; parent = parent.offsetParent; @@ -352,7 +353,8 @@ exports.ViewUtils = Montage.create(Component, { // transform the bounds up the tree var parent = child.offsetParent; - if ( parent ) + // TODO - Should have a different way to check for new template mode + if ( parent || ((child === this.application.ninja.currentDocument.documentRoot) && (child.id !== "UserContent")) ) { this.setViewportObj( child ); -- cgit v1.2.3