aboutsummaryrefslogtreecommitdiff
path: root/js/stage/layout.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-23 16:09:22 -0700
committerNivesh Rajbhandari2012-05-23 16:09:22 -0700
commitf97590388467b5a3316f6f155162fc293915fddc (patch)
treea2888e65b53704caeb9f4f84d5a85dbdb19e4ff6 /js/stage/layout.js
parentf1dbf7c58e91a27c80f3a607e87ad122d803c500 (diff)
downloadninja-f97590388467b5a3316f6f155162fc293915fddc.tar.gz
Fixed scrolling and centering stage code. Also, moved liveNodeList into the design view and added an option to exclude styles and text nodes when retrieving the live nodes.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/stage/layout.js')
-rwxr-xr-xjs/stage/layout.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index 9c5e2167..107e8abf 100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -64,10 +64,10 @@ exports.Layout = Montage.create(Component, {
64 if(this.application.ninja.documentController.activeDocument.currentView === "design") { 64 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
65 this.elementsToDraw = this.application.ninja.documentController.activeDocument.documentRoot.childNodes; 65 this.elementsToDraw = this.application.ninja.documentController.activeDocument.documentRoot.childNodes;
66 } 66 }
67 67//
68 // Draw the elements and the 3d info 68// // Draw the elements and the 3d info
69 this.draw(); 69// this.draw();
70 this.draw3DInfo(false); 70// this.draw3DInfo(false);
71 } 71 }
72 }, 72 },
73 73
@@ -89,7 +89,8 @@ exports.Layout = Montage.create(Component, {
89 89
90 if(this.application.ninja.documentController.activeDocument.currentView === "design"){ 90 if(this.application.ninja.documentController.activeDocument.currentView === "design"){
91 // Make an array copy of the line node list which is not an array like object 91 // Make an array copy of the line node list which is not an array like object
92 this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0); 92// this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0);
93 this.domTree = this.application.ninja.currentDocument.model.views.design.getLiveNodeList(true);
93 // Index of the current container 94 // Index of the current container
94 containerIndex = this.domTree.indexOf(this.application.ninja.currentSelectedContainer); 95 containerIndex = this.domTree.indexOf(this.application.ninja.currentSelectedContainer);
95 96