aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAnanya Sen2012-03-06 16:11:52 -0800
committerAnanya Sen2012-03-06 16:11:52 -0800
commit0e221e80eb41bbe770c195838373b9e27de54c7a (patch)
tree151d9fbeff007a75d6945f8d29210f8f0315b7e1 /js
parent7271c25bf34917b1751f433d284f21485057425b (diff)
downloadninja-0e221e80eb41bbe770c195838373b9e27de54c7a.tar.gz
IKNINJA-1207: added check for design view to fix js error
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/stage/layout.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index de4c67c1..ab2daf9b 100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -65,8 +65,9 @@ exports.Layout = Montage.create(Component, {
65 handleOpenDocument: { 65 handleOpenDocument: {
66 value: function() { 66 value: function() {
67 // Initial elements to draw is the entire node list 67 // Initial elements to draw is the entire node list
68 this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList; 68 if(typeof this.application.ninja.documentController.activeDocument._liveNodeList !== "undefined"){//only for designer view
69 69 this.elementsToDraw = this.application.ninja.documentController.activeDocument._liveNodeList;
70 }
70 // Draw the elements and the 3d info 71 // Draw the elements and the 3d info
71 this.draw(); 72 this.draw();
72 this.draw3DInfo(false); 73 this.draw3DInfo(false);
@@ -104,8 +105,9 @@ exports.Layout = Montage.create(Component, {
104 } 105 }
105 106
106 // Make an array copy of the line node list which is not an array like object 107 // Make an array copy of the line node list which is not an array like object
107 this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0); 108 if(typeof this.application.ninja.documentController.activeDocument._liveNodeList !== "undefined"){//only for designer view
108 109 this.domTree = Array.prototype.slice.call(this.application.ninja.documentController.activeDocument._liveNodeList, 0);
110 }
109 // Clear the elements to draw 111 // Clear the elements to draw
110 this.elementsToDraw.length = 0; 112 this.elementsToDraw.length = 0;
111 113