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.js23
1 files changed, 2 insertions, 21 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index c60a12a2..33a41a8e 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -62,6 +62,8 @@ exports.HtmlDocument = Montage.create(Component, {
62 parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach 62 parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach
63 views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic 63 views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic
64 }); 64 });
65 //Calling the any init routines in the model
66 this.model.init();
65 //Initiliazing views and hiding 67 //Initiliazing views and hiding
66 if (this.model.views.design.initialize(this.model.parentContainer)) { 68 if (this.model.views.design.initialize(this.model.parentContainer)) {
67 //Hiding iFrame, just initiliazing 69 //Hiding iFrame, just initiliazing
@@ -117,10 +119,6 @@ exports.HtmlDocument = Montage.create(Component, {
117 // 119 //
118 serializeDocument: { 120 serializeDocument: {
119 value: function () { 121 value: function () {
120 // There are not needed for now since we cannot change them
121 //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing;
122 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing;
123
124 // Serialize the current scroll position 122 // Serialize the current scroll position
125 //TODO: Move these properties to the design view class 123 //TODO: Move these properties to the design view class
126 this.model.scrollLeft = this.application.ninja.stage._scrollLeft; 124 this.model.scrollLeft = this.application.ninja.stage._scrollLeft;
@@ -132,11 +130,6 @@ exports.HtmlDocument = Montage.create(Component, {
132 // Serialize the selection, the container and grid 130 // Serialize the selection, the container and grid
133 //TODO: Move this property to the design view class 131 //TODO: Move this property to the design view class
134 this.model.selection = this.application.ninja.selectedElements.slice(0); 132 this.model.selection = this.application.ninja.selectedElements.slice(0);
135 this.model.selectionContainer = this.application.ninja.currentSelectedContainer;
136 this.draw3DGrid = this.application.ninja.appModel.show3dGrid;
137
138 // Serialize the undo
139 // TODO: Save the montage undo queue
140 133
141 // Pause the videos 134 // Pause the videos
142 //TODO: Move these to be handled on the show/hide methods in the view 135 //TODO: Move these to be handled on the show/hide methods in the view
@@ -147,27 +140,15 @@ exports.HtmlDocument = Montage.create(Component, {
147 // 140 //
148 deserializeDocument: { 141 deserializeDocument: {
149 value: function () { 142 value: function () {
150 // There are not needed for now since we cannot change them
151 //this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing;
152 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
153
154 // Deserialize the current scroll position 143 // Deserialize the current scroll position
155 //TODO: Move these properties to the design view class 144 //TODO: Move these properties to the design view class
156 this.application.ninja.stage._scrollLeft = this.model.scrollLeft; 145 this.application.ninja.stage._scrollLeft = this.model.scrollLeft;
157 this.application.ninja.stage._scrollTop = this.model.scrollTop; 146 this.application.ninja.stage._scrollTop = this.model.scrollTop;
158 this.application.ninja.stage._userContentLeft = this.model.userContentLeft; 147 this.application.ninja.stage._userContentLeft = this.model.userContentLeft;
159 this.application.ninja.stage._userContentTop = this.model.userContentTop; 148 this.application.ninja.stage._userContentTop = this.model.userContentTop;
160
161 //TODO: Move this property to the design view class
162 this.application.ninja.selectedElements = this.model.selection.slice(0);
163// this.application.ninja.currentSelectedContainer = this.model.selectionContainer;
164 this.application.ninja.appModel.show3dGrid = this.draw3DGrid;
165 149
166 // Serialize the undo 150 // Serialize the undo
167 // TODO: Save the montage undo queue 151 // TODO: Save the montage undo queue
168
169 //TODO: Move this to the document controller
170 this.model.isActive = true;
171 } 152 }
172 } 153 }
173 //////////////////////////////////////////////////////////////////// 154 ////////////////////////////////////////////////////////////////////