diff options
author | Valerio Virgillito | 2012-05-04 18:10:52 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-04 18:10:52 -0700 |
commit | 30e837ade2da7cb20caf7c5a69faf0888736bb9a (patch) | |
tree | 3155deaea5616fa09fc96c84567419fec5f288a2 /js/helper-classes/3D/view-utils.js | |
parent | 3ebed34665fa73b0ce613b400f3029ebf4476439 (diff) | |
parent | 1b2af54128985c1b622e13ea740a8402e57527cc (diff) | |
download | ninja-30e837ade2da7cb20caf7c5a69faf0888736bb9a.tar.gz |
Merge pull request #195 from mqg734/Dom-Architecture
Fixes for 3d, selection, and keyboard shortcuts
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 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, { | |||
309 | // transform the bounds up the tree | 309 | // transform the bounds up the tree |
310 | var child = elt; | 310 | var child = elt; |
311 | var parent = elt.offsetParent; | 311 | var parent = elt.offsetParent; |
312 | while ( parent ) | 312 | while ( child ) |
313 | { | 313 | { |
314 | pt = this.childToParent( pt, child ); | 314 | pt = this.childToParent( pt, child ); |
315 | 315 | ||
316 | if (parent === this._rootElement) break; | 316 | // if (parent === this._rootElement) break; |
317 | if (child === this._stageElement) break; | ||
317 | 318 | ||
318 | child = parent; | 319 | child = parent; |
319 | parent = parent.offsetParent; | 320 | parent = parent.offsetParent; |
@@ -352,7 +353,8 @@ exports.ViewUtils = Montage.create(Component, { | |||
352 | 353 | ||
353 | // transform the bounds up the tree | 354 | // transform the bounds up the tree |
354 | var parent = child.offsetParent; | 355 | var parent = child.offsetParent; |
355 | if ( parent ) | 356 | // TODO - Should have a different way to check for new template mode |
357 | if ( parent || ((child === this.application.ninja.currentDocument.documentRoot) && (child.id !== "UserContent")) ) | ||
356 | { | 358 | { |
357 | this.setViewportObj( child ); | 359 | this.setViewportObj( child ); |
358 | 360 | ||