aboutsummaryrefslogtreecommitdiff
path: root/js/stage/layout.js
diff options
context:
space:
mode:
authorEric Guzman2012-06-19 01:20:36 -0700
committerEric Guzman2012-06-19 01:20:36 -0700
commit2ef72cdf0e59fb3623a2c13251ac707522f3dc5a (patch)
treef69f4e3de7e4441311ef2b38770e0ce26067aac4 /js/stage/layout.js
parent5260d3dfd99d79924c4aaa3ab798e90c7d328d7d (diff)
parent1007cbf983ad0f2460a4122a492a96023fdb4439 (diff)
downloadninja-2ef72cdf0e59fb3623a2c13251ac707522f3dc5a.tar.gz
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Conflicts: js/stage/binding-view.reel/binding-view.js
Diffstat (limited to 'js/stage/layout.js')
-rwxr-xr-xjs/stage/layout.js17
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
18exports.Layout = Montage.create(Component, { 18exports.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