aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-18 14:20:40 -0700
committerJose Antonio Marquez2012-05-18 14:20:40 -0700
commit615ec16fb7e3f7da9f0718a26d8242682ab1f588 (patch)
tree92f3f7d31302d781482496e4fc456c867de5bd49 /js/document
parent6c70c8bf28c2239d29f3abecc8a7ea59b2860bab (diff)
parent66edf78c7e5df11218ef733686965beab05c7c7d (diff)
downloadninja-615ec16fb7e3f7da9f0718a26d8242682ab1f588.tar.gz
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
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