diff options
author | Eric Guzman | 2012-05-22 15:57:23 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-22 15:57:23 -0700 |
commit | ad3b4595d7377e5bf75bcb8ad81007859b0a8a02 (patch) | |
tree | ecb7fe289824a625b1dc422a97c2236826081ec3 /js/document/document-html.js | |
parent | 0eb95ff2dbba1fe7213eed2e0140b4d07bda3dd5 (diff) | |
parent | 2b207ef8b2594927f8cd6cd63a8483d205cb86c4 (diff) | |
download | ninja-ad3b4595d7377e5bf75bcb8ad81007859b0a8a02.tar.gz |
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into CSSPanelUpdates
Conflicts:
js/controllers/styles-controller.js
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 983da966..f92a425c 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,23 +140,25 @@ 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; |
145 | this.model.userContentTop = this.application.ninja.stage._userContentTop; | 147 | this.model.userContentTop = this.application.ninja.stage._userContentTop; |
146 | 148 | ||
147 | 149 | ||
148 | // Serialize the selection | 150 | // Serialize the selection, the container and grid |
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); |
153 | this.model.selectionContainer = this.application.ninja.currentSelectedContainer; | ||
150 | this.draw3DGrid = this.application.ninja.appModel.show3dGrid; | 154 | this.draw3DGrid = this.application.ninja.appModel.show3dGrid; |
151 | 155 | ||
152 | // Serialize the undo | 156 | // Serialize the undo |
153 | // TODO: Save the montage undo queue | 157 | // TODO: Save the montage undo queue |
154 | 158 | ||
155 | // Pause the videos | 159 | // Pause the videos |
160 | //TODO: Move these to be handled on the show/hide methods in the view | ||
156 | this.model.views.design.pauseVideos(); | 161 | this.model.views.design.pauseVideos(); |
157 | |||
158 | this.model.isActive = false; | ||
159 | } | 162 | } |
160 | }, | 163 | }, |
161 | //////////////////////////////////////////////////////////////////// | 164 | //////////////////////////////////////////////////////////////////// |
@@ -167,18 +170,21 @@ exports.HtmlDocument = Montage.create(Component, { | |||
167 | //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; | 170 | //this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; |
168 | 171 | ||
169 | // Deserialize the current scroll position | 172 | // Deserialize the current scroll position |
173 | //TODO: Move these properties to the design view class | ||
170 | this.application.ninja.stage._scrollLeft = this.model.scrollLeft; | 174 | this.application.ninja.stage._scrollLeft = this.model.scrollLeft; |
171 | this.application.ninja.stage._scrollTop = this.model.scrollTop; | 175 | this.application.ninja.stage._scrollTop = this.model.scrollTop; |
172 | this.application.ninja.stage._userContentLeft = this.model.userContentLeft; | 176 | this.application.ninja.stage._userContentLeft = this.model.userContentLeft; |
173 | this.application.ninja.stage._userContentTop = this.model.userContentTop; | 177 | this.application.ninja.stage._userContentTop = this.model.userContentTop; |
174 | 178 | ||
179 | //TODO: Move this property to the design view class | ||
175 | this.application.ninja.selectedElements = this.model.selection.slice(0); | 180 | this.application.ninja.selectedElements = this.model.selection.slice(0); |
176 | 181 | // this.application.ninja.currentSelectedContainer = this.model.selectionContainer; | |
177 | this.application.ninja.appModel.show3dGrid = this.draw3DGrid; | 182 | this.application.ninja.appModel.show3dGrid = this.draw3DGrid; |
178 | 183 | ||
179 | // Serialize the undo | 184 | // Serialize the undo |
180 | // TODO: Save the montage undo queue | 185 | // TODO: Save the montage undo queue |
181 | 186 | ||
187 | //TODO: Move this to the document controller | ||
182 | this.model.isActive = true; | 188 | this.model.isActive = true; |
183 | } | 189 | } |
184 | } | 190 | } |