aboutsummaryrefslogtreecommitdiff
path: root/js/stage/layout.js
diff options
context:
space:
mode:
authorJon Reid2012-06-15 10:10:41 -0700
committerJon Reid2012-06-15 10:10:41 -0700
commit526ac54f73d53e1e2a3d6a4dbf4f9992c143baf7 (patch)
tree65939e59615aaa10a7db77211e71616ad531bd0e /js/stage/layout.js
parentb5b760ee82e5cc4da176914983a6002cbf86c11a (diff)
parent5ee0c89fa0c7acc280ff3b884767e8513fd0b315 (diff)
downloadninja-526ac54f73d53e1e2a3d6a4dbf4f9992c143baf7.tar.gz
Merge remote-tracking branch 'ninja-internal/master' into test-merge
Conflicts: js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html js/panels/Timeline/TimelineTrack.reel/TimelineTrack.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