aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index bb391793..d6b4ba95 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -125,9 +125,10 @@ exports.HtmlDocument = Montage.create(Component, {
125 // 125 //
126 closeDocument: { 126 closeDocument: {
127 value: function (context, callback) { 127 value: function (context, callback) {
128 //Closing document and getting outcome
128 var closed = this.model.close(null); 129 var closed = this.model.close(null);
129 130 //Making callback if specified
130 callback.call(context, this); 131 if (callback) callback.call(context, this);
131 } 132 }
132 }, 133 },
133 //////////////////////////////////////////////////////////////////// 134 ////////////////////////////////////////////////////////////////////
@@ -139,6 +140,7 @@ exports.HtmlDocument = Montage.create(Component, {
139 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; 140 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing;
140 141
141 // Serialize the current scroll position 142 // Serialize the current scroll position
143 //TODO: Move these properties to the design view class
142 this.model.scrollLeft = this.application.ninja.stage._scrollLeft; 144 this.model.scrollLeft = this.application.ninja.stage._scrollLeft;
143 this.model.scrollTop = this.application.ninja.stage._scrollTop; 145 this.model.scrollTop = this.application.ninja.stage._scrollTop;
144 this.model.userContentLeft = this.application.ninja.stage._userContentLeft; 146 this.model.userContentLeft = this.application.ninja.stage._userContentLeft;
@@ -146,6 +148,7 @@ exports.HtmlDocument = Montage.create(Component, {
146 148
147 149
148 // Serialize the selection 150 // Serialize the selection
151 //TODO: Move this property to the design view class
149 this.model.selection = this.application.ninja.selectedElements.slice(0); 152 this.model.selection = this.application.ninja.selectedElements.slice(0);
150 this.draw3DGrid = this.application.ninja.appModel.show3dGrid; 153 this.draw3DGrid = this.application.ninja.appModel.show3dGrid;
151 154
@@ -153,9 +156,8 @@ exports.HtmlDocument = Montage.create(Component, {
153 // TODO: Save the montage undo queue 156 // TODO: Save the montage undo queue
154 157
155 // Pause the videos 158 // Pause the videos
159 //TODO: Move these to be handled on the show/hide methods in the view
156 this.model.views.design.pauseVideos(); 160 this.model.views.design.pauseVideos();
157
158// this.model.isActive = false;
159 } 161 }
160 }, 162 },
161 //////////////////////////////////////////////////////////////////// 163 ////////////////////////////////////////////////////////////////////
@@ -167,18 +169,21 @@ exports.HtmlDocument = Montage.create(Component, {
167 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; 169 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
168 170
169 // Deserialize the current scroll position 171 // Deserialize the current scroll position
172 //TODO: Move these properties to the design view class
170 this.application.ninja.stage._scrollLeft = this.model.scrollLeft; 173 this.application.ninja.stage._scrollLeft = this.model.scrollLeft;
171 this.application.ninja.stage._scrollTop = this.model.scrollTop; 174 this.application.ninja.stage._scrollTop = this.model.scrollTop;
172 this.application.ninja.stage._userContentLeft = this.model.userContentLeft; 175 this.application.ninja.stage._userContentLeft = this.model.userContentLeft;
173 this.application.ninja.stage._userContentTop = this.model.userContentTop; 176 this.application.ninja.stage._userContentTop = this.model.userContentTop;
174 177
178 //TODO: Move this property to the design view class
175 this.application.ninja.selectedElements = this.model.selection.slice(0); 179 this.application.ninja.selectedElements = this.model.selection.slice(0);
176 180
177 this.application.ninja.appModel.show3dGrid = this.draw3DGrid; 181 this.application.ninja.appModel.show3dGrid = this.draw3DGrid;
178 182
179 // Serialize the undo 183 // Serialize the undo
180 // TODO: Save the montage undo queue 184 // TODO: Save the montage undo queue
181 185
186 //TODO: Move this to the document controller
182 this.model.isActive = true; 187 this.model.isActive = true;
183 } 188 }
184 } 189 }