diff options
Diffstat (limited to 'js/lib/NJUtils.js')
-rwxr-xr-x | js/lib/NJUtils.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 96e1d6da..f6284b6c 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js | |||
@@ -96,7 +96,10 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
96 | ///// TODO: find a different place for this function | 96 | ///// TODO: find a different place for this function |
97 | makeElementModel: { | 97 | makeElementModel: { |
98 | value: function(el, selection, controller, isShape) { | 98 | value: function(el, selection, controller, isShape) { |
99 | var p3d = Montage.create(Properties3D).init(el); | 99 | var p3d = Montage.create(Properties3D); |
100 | if(selection === "Stage") { | ||
101 | p3d.init(el, true); | ||
102 | } | ||
100 | var shapeProps = null; | 103 | var shapeProps = null; |
101 | var pi = controller + "Pi"; | 104 | var pi = controller + "Pi"; |
102 | 105 | ||
@@ -138,7 +141,8 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
138 | controller: { value: ControllerFactory.getController(controller)}, | 141 | controller: { value: ControllerFactory.getController(controller)}, |
139 | pi: { value: pi}, | 142 | pi: { value: pi}, |
140 | props3D: { value: p3d}, | 143 | props3D: { value: p3d}, |
141 | shapeModel: { value: shapeProps} | 144 | shapeModel: { value: shapeProps}, |
145 | isShape: { value: isShape} | ||
142 | }); | 146 | }); |
143 | 147 | ||
144 | } | 148 | } |
@@ -170,6 +174,7 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
170 | // TODO - Need more info about the shape | 174 | // TODO - Need more info about the shape |
171 | selection = "canvas"; | 175 | selection = "canvas"; |
172 | controller = "shape"; | 176 | controller = "shape"; |
177 | isShape = true; | ||
173 | } | 178 | } |
174 | else | 179 | else |
175 | { | 180 | { |
@@ -181,6 +186,9 @@ exports.NJUtils = Object.create(Object.prototype, { | |||
181 | break; | 186 | break; |
182 | } | 187 | } |
183 | this.makeElementModel(el, selection, controller, isShape); | 188 | this.makeElementModel(el, selection, controller, isShape); |
189 | if(el.elementModel && el.elementModel.props3D) { | ||
190 | el.elementModel.props3D.init(el, (selection === "Stage")); | ||
191 | } | ||
184 | } | 192 | } |
185 | }, | 193 | }, |
186 | 194 | ||