From 51b4e61d6c6df5e88e9a5dfcdfd7944e2a3f64e7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 30 Jan 2012 13:25:15 -0800 Subject: Syncing stage view when rotating stage. Signed-off-by: Nivesh Rajbhandari --- js/stage/layout.js | 14 +++++++++++--- js/stage/stage.reel/stage.js | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'js/stage') diff --git a/js/stage/layout.js b/js/stage/layout.js index 625c09ad..89fa44f3 100644 --- a/js/stage/layout.js +++ b/js/stage/layout.js @@ -112,6 +112,7 @@ exports.Layout = Montage.create(Component, { } this.draw(); // Not a reel yet :) + this.draw3DInfo(false); } @@ -128,9 +129,16 @@ exports.Layout = Montage.create(Component, { }, draw3DInfo: { - value: function() { - drawUtils.updatePlanes(); - if(this.stage.appModel.show3dGrid) drawUtils.drawWorkingPlane(); + value: function(updatePlanes) { + if(updatePlanes) + { + drawUtils.updatePlanes(); + } + if(this.stage.appModel.show3dGrid) + { + this.application.ninja.stage.stageDeps.snapManager.updateWorkingPlaneFromView(); + drawUtils.drawWorkingPlane(); + } drawUtils.draw3DCompass(); } }, diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 3e0b852e..31d0f8c2 100644 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -175,7 +175,7 @@ exports.Stage = Montage.create(Component, { } else if(this.updatedStage) { this.layout.draw(); - this.layout.draw3DInfo(); + this.layout.draw3DInfo(true); } } }, -- cgit v1.2.3 From 8b8b9bc1cd033b483f3a5c57acc75dfb56e099a4 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 30 Jan 2012 14:21:59 -0800 Subject: Fixed grid not drawing bug when switching from front to top and side. Signed-off-by: Nivesh Rajbhandari --- js/stage/stage.reel/stage.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 31d0f8c2..8c4efd58 100644 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -814,8 +814,8 @@ exports.Stage = Montage.create(Component, { setStageView: { value: function(side) { var mat, - workingPlane = null, - currentDoc = this.application.ninja.currentDocument.documentRoot; + currentDoc = this.application.ninja.currentDocument.documentRoot, + isDrawingGrid = this.application.ninja.appModel.show3dGrid; // Stage 3d Props. currentDoc.elementModel.props3D.ResetTranslationValues(); currentDoc.elementModel.props3D.ResetRotationValues(); @@ -826,7 +826,7 @@ exports.Stage = Montage.create(Component, { mat = Matrix.RotationX(Math.PI * 270.0/180.0); drawUtils.drawXY = drawUtils.drawYZ = false; - drawUtils.drawXZ = drawUtils.isDrawingGrid(); + drawUtils.drawXZ = isDrawingGrid; workingPlane = [0,1,0,0]; break; @@ -834,7 +834,7 @@ exports.Stage = Montage.create(Component, { mat = Matrix.RotationY(Math.PI * 270/180); drawUtils.drawXY = drawUtils.drawXZ = false; - drawUtils.drawYZ = drawUtils.isDrawingGrid(); + drawUtils.drawYZ = isDrawingGrid; workingPlane = [1,0,0,0]; break; @@ -842,7 +842,7 @@ exports.Stage = Montage.create(Component, { mat = Matrix.I(4); drawUtils.drawYZ = drawUtils.drawXZ = false; - drawUtils.drawXY = drawUtils.isDrawingGrid(); + drawUtils.drawXY = isDrawingGrid; workingPlane = [0,0,1,0]; break; } -- cgit v1.2.3