diff options
Diffstat (limited to 'js/stage/layout.js')
-rwxr-xr-x | js/stage/layout.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js index 71296405..28484b71 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js | |||
@@ -17,7 +17,16 @@ var Montage = require("montage/core/core").Montage, | |||
17 | 17 | ||
18 | exports.Layout = Montage.create(Component, { | 18 | exports.Layout = Montage.create(Component, { |
19 | 19 | ||
20 | canvas: { value: null }, | 20 | canvas: { |
21 | value: null, | ||
22 | serializable: true | ||
23 | }, | ||
24 | |||
25 | stage: { | ||
26 | value: null, | ||
27 | serializable: true | ||
28 | }, | ||
29 | |||
21 | ctx: { value: null }, | 30 | ctx: { value: null }, |
22 | 31 | ||
23 | drawFillColor: { value: 'rgba(255,255,255,1)' }, | 32 | drawFillColor: { value: 'rgba(255,255,255,1)' }, |
@@ -102,11 +111,11 @@ exports.Layout = Montage.create(Component, { | |||
102 | // Make an array copy of the line node list which is not an array like object | 111 | // Make an array copy of the line node list which is not an array like object |
103 | this.domTree = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true); | 112 | this.domTree = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true); |
104 | // Index of the current container | 113 | // Index of the current container |
105 | containerIndex = this.domTree.indexOf(this.application.ninja.currentSelectedContainer); | 114 | containerIndex = this.domTree.indexOf(this.currentDocument.model.domContainer); |
106 | 115 | ||
107 | if(containerIndex < 0) { | 116 | if(containerIndex < 0) { |
108 | // Stage is the container. | 117 | // Stage is the container. |
109 | this.domTree = Array.prototype.slice.call(this.application.ninja.currentSelectedContainer.childNodes, 0); | 118 | this.domTree = Array.prototype.slice.call(this.currentDocument.model.domContainer.childNodes, 0); |
110 | } else { | 119 | } else { |
111 | // Child nodes of the container | 120 | // Child nodes of the container |
112 | this.domTree = Array.prototype.slice.call(this.domTree[containerIndex].childNodes, 0); | 121 | this.domTree = Array.prototype.slice.call(this.domTree[containerIndex].childNodes, 0); |
@@ -204,7 +213,7 @@ exports.Layout = Montage.create(Component, { | |||
204 | bounds3D[j] = tmpPt; | 213 | bounds3D[j] = tmpPt; |
205 | } | 214 | } |
206 | 215 | ||
207 | if(item.uuid === this.application.ninja.currentSelectedContainer.uuid) { | 216 | if(item.uuid === this.currentDocument.model.domContainer.uuid) { |
208 | this.ctx.save(); | 217 | this.ctx.save(); |
209 | this.ctx.strokeStyle = "#C61F00"; | 218 | this.ctx.strokeStyle = "#C61F00"; |
210 | 219 | ||