diff options
Diffstat (limited to 'js/stage')
-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 |
3 files changed, 15 insertions, 27 deletions
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 |