aboutsummaryrefslogtreecommitdiff
path: root/js/lib/NJUtils.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-17 18:11:55 -0700
committerAnanya Sen2012-04-17 18:11:55 -0700
commit35abad196cc9feb76ef50c1b63032a38233a6d51 (patch)
tree914689c66d4ab6c6e088b571eade0a0e35082916 /js/lib/NJUtils.js
parent1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff)
parent616a8532099fec2a15855eac97cd85cb60c4451c (diff)
downloadninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
Diffstat (limited to 'js/lib/NJUtils.js')
-rwxr-xr-xjs/lib/NJUtils.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js
index 904aa41e..67bb59c4 100755
--- a/js/lib/NJUtils.js
+++ b/js/lib/NJUtils.js
@@ -94,7 +94,10 @@ exports.NJUtils = Object.create(Object.prototype, {
94 ///// TODO: find a different place for this function 94 ///// TODO: find a different place for this function
95 makeElementModel: { 95 makeElementModel: {
96 value: function(el, selection, controller, isShape) { 96 value: function(el, selection, controller, isShape) {
97 var p3d = Montage.create(Properties3D).init(el); 97 var p3d = Montage.create(Properties3D);
98 if(selection === "Stage") {
99 p3d.init(el, true);
100 }
98 var shapeProps = null; 101 var shapeProps = null;
99 var pi = controller + "Pi"; 102 var pi = controller + "Pi";
100 103
@@ -136,7 +139,8 @@ exports.NJUtils = Object.create(Object.prototype, {
136 controller: { value: ControllerFactory.getController(controller)}, 139 controller: { value: ControllerFactory.getController(controller)},
137 pi: { value: pi}, 140 pi: { value: pi},
138 props3D: { value: p3d}, 141 props3D: { value: p3d},
139 shapeModel: { value: shapeProps} 142 shapeModel: { value: shapeProps},
143 isShape: { value: isShape}
140 }); 144 });
141 145
142 } 146 }
@@ -168,6 +172,7 @@ exports.NJUtils = Object.create(Object.prototype, {
168 // TODO - Need more info about the shape 172 // TODO - Need more info about the shape
169 selection = "canvas"; 173 selection = "canvas";
170 controller = "shape"; 174 controller = "shape";
175 isShape = true;
171 } 176 }
172 else 177 else
173 { 178 {
@@ -179,6 +184,9 @@ exports.NJUtils = Object.create(Object.prototype, {
179 break; 184 break;
180 } 185 }
181 this.makeElementModel(el, selection, controller, isShape); 186 this.makeElementModel(el, selection, controller, isShape);
187 if(el.elementModel && el.elementModel.props3D) {
188 el.elementModel.props3D.init(el, (selection === "Stage"));
189 }
182 } 190 }
183 }, 191 },
184 192