diff options
author | Jose Antonio Marquez | 2012-06-07 11:28:25 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-07 11:28:25 -0700 |
commit | 7d1a564a8fd246c621f674b5521554fbfc058281 (patch) | |
tree | d1be340a099e318db8113b651ba45c3d4c00f3a5 /js/controllers | |
parent | 0efbbf8287517b755be1774f6aa49947bed50a0d (diff) | |
parent | b75fe9369f7caec0351d298f7106c8d59572b440 (diff) | |
download | ninja-7d1a564a8fd246c621f674b5521554fbfc058281.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/elements/body-controller.js | 4 | ||||
-rwxr-xr-x | js/controllers/elements/element-controller.js | 8 | ||||
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 7a3a66f5..9c427c62 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js | |||
@@ -71,7 +71,7 @@ exports.BodyController = Montage.create(ElementController, { | |||
71 | 71 | ||
72 | getPerspectiveDist: { | 72 | getPerspectiveDist: { |
73 | value: function(el) { | 73 | value: function(el) { |
74 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { | 74 | if(el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { |
75 | return el.elementModel.props3D.perspectiveDist; | 75 | return el.elementModel.props3D.perspectiveDist; |
76 | } else { | 76 | } else { |
77 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); | 77 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); |
@@ -83,7 +83,7 @@ exports.BodyController = Montage.create(ElementController, { | |||
83 | 83 | ||
84 | getMatrix: { | 84 | getMatrix: { |
85 | value: function(el) { | 85 | value: function(el) { |
86 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.matrix3d) | 86 | if(el.elementModel.props3D && el.elementModel.props3D.matrix3d) |
87 | { | 87 | { |
88 | return el.elementModel.props3D.matrix3d.slice(0); | 88 | return el.elementModel.props3D.matrix3d.slice(0); |
89 | } | 89 | } |
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 941e05ba..4a02e9a3 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -37,7 +37,7 @@ exports.ElementController = Montage.create(Component, { | |||
37 | // Remove the element from the DOM and clear the GLWord. | 37 | // Remove the element from the DOM and clear the GLWord. |
38 | removeElement: { | 38 | removeElement: { |
39 | value: function(el) { | 39 | value: function(el) { |
40 | if(el.elementModel && el.elementModel.shapeModel && el.elementModel.shapeModel.GLWorld) { | 40 | if(el.elementModel.shapeModel && el.elementModel.shapeModel.GLWorld) { |
41 | el.elementModel.shapeModel.GLWorld.clearTree(); | 41 | el.elementModel.shapeModel.GLWorld.clearTree(); |
42 | } | 42 | } |
43 | el.parentNode.removeChild(el); | 43 | el.parentNode.removeChild(el); |
@@ -277,7 +277,7 @@ exports.ElementController = Montage.create(Component, { | |||
277 | // Routines to get/set 3D properties | 277 | // Routines to get/set 3D properties |
278 | get3DProperty: { | 278 | get3DProperty: { |
279 | value: function(el, prop) { | 279 | value: function(el, prop) { |
280 | if(el.elementModel && el.elementModel.props3D) { | 280 | if(el.elementModel.props3D) { |
281 | return el.elementModel.props3D[prop]; | 281 | return el.elementModel.props3D[prop]; |
282 | } | 282 | } |
283 | } | 283 | } |
@@ -285,7 +285,7 @@ exports.ElementController = Montage.create(Component, { | |||
285 | 285 | ||
286 | getMatrix: { | 286 | getMatrix: { |
287 | value: function(el) { | 287 | value: function(el) { |
288 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.matrix3d) { | 288 | if(el.elementModel.props3D && el.elementModel.props3D.matrix3d) { |
289 | return el.elementModel.props3D.matrix3d.slice(0); | 289 | return el.elementModel.props3D.matrix3d.slice(0); |
290 | } else { | 290 | } else { |
291 | var mat; | 291 | var mat; |
@@ -305,7 +305,7 @@ exports.ElementController = Montage.create(Component, { | |||
305 | 305 | ||
306 | getPerspectiveDist: { | 306 | getPerspectiveDist: { |
307 | value: function(el) { | 307 | value: function(el) { |
308 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { | 308 | if(el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { |
309 | return el.elementModel.props3D.perspectiveDist; | 309 | return el.elementModel.props3D.perspectiveDist; |
310 | } else { | 310 | } else { |
311 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false); | 311 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false); |
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 845e7dc2..9fc9b576 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -133,7 +133,7 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
133 | canvas.setAttribute("data-RDGE-id", njModule.NJUtils.generateRandom()); | 133 | canvas.setAttribute("data-RDGE-id", njModule.NJUtils.generateRandom()); |
134 | canvas.width = el.width; | 134 | canvas.width = el.width; |
135 | canvas.height = el.height; | 135 | canvas.height = el.height; |
136 | canvas.elementModel = el.elementModel; | 136 | canvas._model = el.elementModel; |
137 | this.toggleWebGlMode(canvas, value); | 137 | this.toggleWebGlMode(canvas, value); |
138 | this.application.ninja.elementMediator.replaceElement(canvas, el); | 138 | this.application.ninja.elementMediator.replaceElement(canvas, el); |
139 | break; | 139 | break; |