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.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 983da966..ae5b73b6 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,8 +156,10 @@ 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 161
162 //TODO: Move this to the document controller
158 this.model.isActive = false; 163 this.model.isActive = false;
159 } 164 }
160 }, 165 },
@@ -167,18 +172,21 @@ exports.HtmlDocument = Montage.create(Component, {
167 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; 172 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
168 173
169 // Deserialize the current scroll position 174 // Deserialize the current scroll position
175 //TODO: Move these properties to the design view class
170 this.application.ninja.stage._scrollLeft = this.model.scrollLeft; 176 this.application.ninja.stage._scrollLeft = this.model.scrollLeft;
171 this.application.ninja.stage._scrollTop = this.model.scrollTop; 177 this.application.ninja.stage._scrollTop = this.model.scrollTop;
172 this.application.ninja.stage._userContentLeft = this.model.userContentLeft; 178 this.application.ninja.stage._userContentLeft = this.model.userContentLeft;
173 this.application.ninja.stage._userContentTop = this.model.userContentTop; 179 this.application.ninja.stage._userContentTop = this.model.userContentTop;
174 180
181 //TODO: Move this property to the design view class
175 this.application.ninja.selectedElements = this.model.selection.slice(0); 182 this.application.ninja.selectedElements = this.model.selection.slice(0);
176 183
177 this.application.ninja.appModel.show3dGrid = this.draw3DGrid; 184 this.application.ninja.appModel.show3dGrid = this.draw3DGrid;
178 185
179 // Serialize the undo 186 // Serialize the undo
180 // TODO: Save the montage undo queue 187 // TODO: Save the montage undo queue
181 188
189 //TODO: Move this to the document controller
182 this.model.isActive = true; 190 this.model.isActive = true;
183 } 191 }
184 } 192 }