diff options
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 2 | ||||
-rwxr-xr-x | js/stage/layout.js | 3 | ||||
-rwxr-xr-x | js/stage/stage-deps.js | 24 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 15 |
4 files changed, 16 insertions, 28 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 75aa308c..9e9a2241 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -627,11 +627,11 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
627 | { | 627 | { |
628 | value: function () | 628 | value: function () |
629 | { | 629 | { |
630 | this.application.ninja.stage.clearGridCanvas(); | ||
630 | if (!this.isDrawingGrid()) return; | 631 | if (!this.isDrawingGrid()) return; |
631 | 632 | ||
632 | var saveContext = this.getDrawingSurfaceElement(); | 633 | var saveContext = this.getDrawingSurfaceElement(); |
633 | this.setDrawingSurfaceElement(this.application.ninja.stage.gridCanvas); | 634 | this.setDrawingSurfaceElement(this.application.ninja.stage.gridCanvas); |
634 | this.clear(); | ||
635 | 635 | ||
636 | // 3 coordinate axes for the plane | 636 | // 3 coordinate axes for the plane |
637 | var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; | 637 | var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; |
diff --git a/js/stage/layout.js b/js/stage/layout.js index 7b4ccc17..4eecd4d5 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js | |||
@@ -140,9 +140,8 @@ exports.Layout = Montage.create(Component, { | |||
140 | 140 | ||
141 | if(this.stage.appModel.show3dGrid) { | 141 | if(this.stage.appModel.show3dGrid) { |
142 | this.application.ninja.stage.stageDeps.snapManager.updateWorkingPlaneFromView(); | 142 | this.application.ninja.stage.stageDeps.snapManager.updateWorkingPlaneFromView(); |
143 | drawUtils.drawWorkingPlane(); | ||
144 | } | 143 | } |
145 | 144 | drawUtils.drawWorkingPlane(); | |
146 | drawUtils.draw3DCompass(); | 145 | drawUtils.draw3DCompass(); |
147 | } | 146 | } |
148 | }, | 147 | }, |
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js index 2469ba79..b45315b7 100755 --- a/js/stage/stage-deps.js +++ b/js/stage/stage-deps.js | |||
@@ -55,28 +55,6 @@ exports.StageDeps = Montage.create(Component, { | |||
55 | drawUtils.snapManager = snapManager; | 55 | drawUtils.snapManager = snapManager; |
56 | drawUtils.ElementPlanes = ElementPlanes; | 56 | drawUtils.ElementPlanes = ElementPlanes; |
57 | } | 57 | } |
58 | }, | ||
59 | |||
60 | handleOpenDocument: { | ||
61 | value: function() { | ||
62 | |||
63 | workingPlane = [0,0,1,0]; | ||
64 | |||
65 | snapManager._isCacheInvalid = true; | ||
66 | snapManager.setupDragPlaneFromPlane (workingPlane); | ||
67 | |||
68 | drawUtils.initializeFromDocument(); | ||
69 | } | ||
70 | }, | ||
71 | |||
72 | handleSwitchDocument: { | ||
73 | value: function(){ | ||
74 | workingPlane = [0,0,1,0]; | ||
75 | |||
76 | snapManager._isCacheInvalid = true; | ||
77 | snapManager.setupDragPlaneFromPlane (workingPlane); | ||
78 | |||
79 | drawUtils.initializeFromDocument(); | ||
80 | } | ||
81 | } | 58 | } |
59 | |||
82 | }); \ No newline at end of file | 60 | }); \ No newline at end of file |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index d8684739..44d6eadb 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -305,8 +305,7 @@ exports.Stage = Montage.create(Component, { | |||
305 | this._scrollLeft = 0; | 305 | this._scrollLeft = 0; |
306 | this._scrollTop = 0; | 306 | this._scrollTop = 0; |
307 | 307 | ||
308 | this.stageDeps.handleOpenDocument(); | 308 | this.initialize3DOnOpenDocument(); |
309 | this.layout.handleOpenDocument(); | ||
310 | 309 | ||
311 | if(designView._template) { | 310 | if(designView._template) { |
312 | var initialLeft = parseInt((this.canvas.width - designView._template.size.width)/2); | 311 | var initialLeft = parseInt((this.canvas.width - designView._template.size.width)/2); |
@@ -1079,6 +1078,18 @@ exports.Stage = Montage.create(Component, { | |||
1079 | this.application.ninja.toolsSplitter.restore(); | 1078 | this.application.ninja.toolsSplitter.restore(); |
1080 | this.application.ninja.optionsSplitter.restore(); | 1079 | this.application.ninja.optionsSplitter.restore(); |
1081 | } | 1080 | } |
1081 | }, | ||
1082 | |||
1083 | initialize3DOnOpenDocument: { | ||
1084 | value: function() { | ||
1085 | |||
1086 | workingPlane = [0,0,1,0]; | ||
1087 | |||
1088 | this.snapManager._isCacheInvalid = true; | ||
1089 | this.snapManager.setupDragPlaneFromPlane (workingPlane); | ||
1090 | |||
1091 | this.drawUtils.initializeFromDocument(); | ||
1092 | } | ||
1082 | } | 1093 | } |
1083 | 1094 | ||
1084 | }); \ No newline at end of file | 1095 | }); \ No newline at end of file |