aboutsummaryrefslogtreecommitdiff
path: root/js/lib/NJUtils.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-04-10 11:24:35 -0700
committerJose Antonio Marquez2012-04-10 11:24:35 -0700
commite663e336ee7e832b5059a82748061506b414cb04 (patch)
treea09d932319365067f437780e90aeab4ef19f74b4 /js/lib/NJUtils.js
parentc3022de5ba2e24737184dba7454233b165da0a20 (diff)
parentbd43ce383b050d03b0f92cc923c517febc66ca28 (diff)
downloadninja-e663e336ee7e832b5059a82748061506b414cb04.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into Document
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