aboutsummaryrefslogtreecommitdiff
path: root/js/stage/layout.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-08 16:59:59 -0700
committerValerio Virgillito2012-06-08 16:59:59 -0700
commit806974142d44afdd23534bf2d18eff0a8e701e0c (patch)
tree811acab38c063ca4fb594bcab0a6dc5e143f29a2 /js/stage/layout.js
parentd14249dd2d76e9eb8d14733c10393d36bd2ea8ee (diff)
downloadninja-806974142d44afdd23534bf2d18eff0a8e701e0c.tar.gz
rewrite: currentSelectedContainer -> domContainer
Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/stage/layout.js')
-rwxr-xr-xjs/stage/layout.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index 71296405..1831f4e7 100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -102,11 +102,11 @@ exports.Layout = Montage.create(Component, {
102 // Make an array copy of the line node list which is not an array like object 102 // 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); 103 this.domTree = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true);
104 // Index of the current container 104 // Index of the current container
105 containerIndex = this.domTree.indexOf(this.application.ninja.currentSelectedContainer); 105 containerIndex = this.domTree.indexOf(this.currentDocument.model.domContainer);
106 106
107 if(containerIndex < 0) { 107 if(containerIndex < 0) {
108 // Stage is the container. 108 // Stage is the container.
109 this.domTree = Array.prototype.slice.call(this.application.ninja.currentSelectedContainer.childNodes, 0); 109 this.domTree = Array.prototype.slice.call(this.currentDocument.model.domContainer.childNodes, 0);
110 } else { 110 } else {
111 // Child nodes of the container 111 // Child nodes of the container
112 this.domTree = Array.prototype.slice.call(this.domTree[containerIndex].childNodes, 0); 112 this.domTree = Array.prototype.slice.call(this.domTree[containerIndex].childNodes, 0);
@@ -204,7 +204,7 @@ exports.Layout = Montage.create(Component, {
204 bounds3D[j] = tmpPt; 204 bounds3D[j] = tmpPt;
205 } 205 }
206 206
207 if(item.uuid === this.application.ninja.currentSelectedContainer.uuid) { 207 if(item.uuid === this.currentDocument.model.domContainer.uuid) {
208 this.ctx.save(); 208 this.ctx.save();
209 this.ctx.strokeStyle = "#C61F00"; 209 this.ctx.strokeStyle = "#C61F00";
210 210