From 1f1234c25727d0d379fbf706029a18614ec35b5f Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 5 Jun 2012 13:50:27 -0700 Subject: Compass should draw in lower-left regardless of the stage height. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index a793b643..eef28dce 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -1217,7 +1217,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { var saveLineWidth = this._lineWidth; var origLeft = 60; - var origTop = this.snapManager.getStageHeight() - 60; + var origTop = tmpCanvas.height - 60; var mat = this.viewUtils.getMatrixFromElement( this._sourceSpaceElt ); var tMat = Matrix.Translation([origLeft,origTop,0]); -- cgit v1.2.3 From d7555c35b357e28a1e1ccc1c4edc4fe04d2b139a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:39:10 -0700 Subject: fix in the draw utils for drawing the 3d compass Signed-off-by: Valerio Virgillito --- js/helper-classes/3D/draw-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/helper-classes/3D/draw-utils.js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index eef28dce..bef1e435 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -1206,7 +1206,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { // set the element to be the viewport object - temporarily var tmpCanvas = this.application.ninja.stage.canvas; var tmpStage = this.application.ninja.currentDocument.model.documentRoot; - this.viewUtils.pushViewportObj( tmpCanvas ); +// this.viewUtils.pushViewportObj( tmpCanvas ); // save the source space object and set to the target object var saveSource = this._sourceSpaceElt; @@ -1279,7 +1279,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { this.drawArrowHead(rO, zO); // restore the state - this.viewUtils.popViewportObj(); +// this.viewUtils.popViewportObj(); this._drawingContext.restore(); this.setDrawingSurfaceElement(saveContext); this._lineColor = saveColor; -- cgit v1.2.3