aboutsummaryrefslogtreecommitdiff
path: root/js/document/document-html.js
diff options
context:
space:
mode:
authorAnanya Sen2012-05-18 16:57:27 -0700
committerAnanya Sen2012-05-18 16:57:27 -0700
commitbddbcd15c165ac0731de204b023a1e60d71b5d79 (patch)
tree727997cc71d5e9c951c1089dfbdeb90cd3b68e6f /js/document/document-html.js
parent7a22f7b368ef549a5b30c58a0f3900685b764bdb (diff)
parente7c288fe8f5d3a9e5c9f0eb0a045c6c195a0e7b8 (diff)
downloadninja-bddbcd15c165ac0731de204b023a1e60d71b5d79.tar.gz
Merge branch 'refs/heads/master-dom-architecture' into dom-architecture
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-xjs/document/document-html.js31
1 files changed, 26 insertions, 5 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 56d9db02..983da966 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -119,8 +119,6 @@ exports.HtmlDocument = Montage.create(Component, {
119 this._observer = null; 119 this._observer = null;
120 //Making callback after view is loaded 120 //Making callback after view is loaded
121 this.loaded.callback.call(this.loaded.context, this); 121 this.loaded.callback.call(this.loaded.context, this);
122 //Setting opacity to be viewable after load
123 this.model.views.design.iframe.style.opacity = 1;
124 } 122 }
125 }, 123 },
126 //////////////////////////////////////////////////////////////////// 124 ////////////////////////////////////////////////////////////////////
@@ -136,12 +134,16 @@ exports.HtmlDocument = Montage.create(Component, {
136 // 134 //
137 serializeDocument: { 135 serializeDocument: {
138 value: function () { 136 value: function () {
139 // There are not needed for now ssince we cannot change them 137 // There are not needed for now since we cannot change them
140 //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; 138 //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing;
141 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; 139 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing;
142 140
143 // Serialize the current scroll position 141 // Serialize the current scroll position
144 // TODO: Implement 142 this.model.scrollLeft = this.application.ninja.stage._scrollLeft;
143 this.model.scrollTop = this.application.ninja.stage._scrollTop;
144 this.model.userContentLeft = this.application.ninja.stage._userContentLeft;
145 this.model.userContentTop = this.application.ninja.stage._userContentTop;
146
145 147
146 // Serialize the selection 148 // Serialize the selection
147 this.model.selection = this.application.ninja.selectedElements.slice(0); 149 this.model.selection = this.application.ninja.selectedElements.slice(0);
@@ -152,13 +154,32 @@ exports.HtmlDocument = Montage.create(Component, {
152 154
153 // Pause the videos 155 // Pause the videos
154 this.model.views.design.pauseVideos(); 156 this.model.views.design.pauseVideos();
157
158 this.model.isActive = false;
155 } 159 }
156 }, 160 },
157 //////////////////////////////////////////////////////////////////// 161 ////////////////////////////////////////////////////////////////////
158 // 162 //
159 deserializeDocument: { 163 deserializeDocument: {
160 value: function () { 164 value: function () {
161 //TODO: Import functionality 165 // There are not needed for now since we cannot change them
166 //this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing;
167 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
168
169 // Deserialize the current scroll position
170 this.application.ninja.stage._scrollLeft = this.model.scrollLeft;
171 this.application.ninja.stage._scrollTop = this.model.scrollTop;
172 this.application.ninja.stage._userContentLeft = this.model.userContentLeft;
173 this.application.ninja.stage._userContentTop = this.model.userContentTop;
174
175 this.application.ninja.selectedElements = this.model.selection.slice(0);
176
177 this.application.ninja.appModel.show3dGrid = this.draw3DGrid;
178
179 // Serialize the undo
180 // TODO: Save the montage undo queue
181
182 this.model.isActive = true;
162 } 183 }
163 } 184 }
164 //////////////////////////////////////////////////////////////////// 185 ////////////////////////////////////////////////////////////////////