aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/document-html.js11
-rwxr-xr-xjs/document/models/html.js17
2 files changed, 26 insertions, 2 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js
index 0037c94d..983da966 100755
--- a/js/document/document-html.js
+++ b/js/document/document-html.js
@@ -139,7 +139,11 @@ exports.HtmlDocument = Montage.create(Component, {
139 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; 139 //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing;
140 140
141 // Serialize the current scroll position 141 // Serialize the current scroll position
142 // 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
143 147
144 // Serialize the selection 148 // Serialize the selection
145 this.model.selection = this.application.ninja.selectedElements.slice(0); 149 this.model.selection = this.application.ninja.selectedElements.slice(0);
@@ -163,7 +167,10 @@ exports.HtmlDocument = Montage.create(Component, {
163 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; 167 //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
164 168
165 // Deserialize the current scroll position 169 // Deserialize the current scroll position
166 // TODO: Implement 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;
167 174
168 this.application.ninja.selectedElements = this.model.selection.slice(0); 175 this.application.ninja.selectedElements = this.model.selection.slice(0);
169 176
diff --git a/js/document/models/html.js b/js/document/models/html.js
index 67457863..a97b4b5a 100755
--- a/js/document/models/html.js
+++ b/js/document/models/html.js
@@ -28,6 +28,23 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, {
28 value: false 28 value: false
29 }, 29 },
30 //////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////
31 //
32 scrollLeft: {
33 value: null
34 },
35
36 scrollTop: {
37 value: null
38 },
39
40 userContentLeft: {
41 value: null
42 },
43
44 userContentTop: {
45 value: null
46 },
47 ////////////////////////////////////////////////////////////////////
31 // 48 //
32 baseHref: { 49 baseHref: {
33 value: null 50 value: null