diff options
author | Armen Kesablyan | 2012-05-15 16:34:46 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-15 16:34:46 -0700 |
commit | c8d61c8e72e0eba266575f9df54325fa77fde73d (patch) | |
tree | 556cafd76ab9b2cf4cc2b4cc3ea17b12ce690b69 /js/helper-classes/3D | |
parent | 15a3aaebb56cb2c9409bfe55c862868726c7fd44 (diff) | |
parent | 46bd3712329cd3c9311e50ed9ee4c2245bd1be5a (diff) | |
download | ninja-c8d61c8e72e0eba266575f9df54325fa77fde73d.tar.gz |
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into binding
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 6 | ||||
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index f869f65e..b53ac4ad 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -1170,8 +1170,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
1170 | var saveColor = this._lineColor; | 1170 | var saveColor = this._lineColor; |
1171 | var saveLineWidth = this._lineWidth; | 1171 | var saveLineWidth = this._lineWidth; |
1172 | 1172 | ||
1173 | var origLeft = 50; | 1173 | var origLeft = 60; |
1174 | var origTop = 50; | 1174 | var origTop = this.snapManager.getStageHeight() - 60; |
1175 | 1175 | ||
1176 | var mat = this.viewUtils.getMatrixFromElement( this._sourceSpaceElt ); | 1176 | var mat = this.viewUtils.getMatrixFromElement( this._sourceSpaceElt ); |
1177 | var tMat = Matrix.Translation([origLeft,origTop,0]); | 1177 | var tMat = Matrix.Translation([origLeft,origTop,0]); |
@@ -1203,7 +1203,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
1203 | this.setDrawingSurfaceElement(this.application.ninja.stage.layoutCanvas); | 1203 | this.setDrawingSurfaceElement(this.application.ninja.stage.layoutCanvas); |
1204 | // clear just the 3d compass area | 1204 | // clear just the 3d compass area |
1205 | this._drawingContext.save(); | 1205 | this._drawingContext.save(); |
1206 | this._drawingContext.rect(0, 0, 100, 100); | 1206 | this._drawingContext.rect(10, origTop-60, 100, 110); |
1207 | this._drawingContext.clip(); | 1207 | this._drawingContext.clip(); |
1208 | 1208 | ||
1209 | this._drawingContext.lineWidth = 2.0; | 1209 | this._drawingContext.lineWidth = 2.0; |
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index 5dc099ee..8c338f84 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -354,16 +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; | ||
358 | while ( child ) | 357 | while ( child ) |
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; |
363 | if (child === this._stageElement) break; | 362 | // child = child.offsetParent; |
364 | 363 | ||
365 | child = parent; | 364 | if (child === this._stageElement) break; |
366 | parent = parent.offsetParent; | 365 | if (child === this._rootElement) break; |
366 | child = child.offsetParent; | ||
367 | if (child === this._rootElement) break; | ||
367 | } | 368 | } |
368 | 369 | ||
369 | ///////////////////////////////////////////////////////// | 370 | ///////////////////////////////////////////////////////// |