aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-06 16:35:12 -0800
committerNivesh Rajbhandari2012-02-06 16:35:12 -0800
commit92ae17bc800cf82cdbd1482ef1af1a5fd7bd632a (patch)
tree2e1ef434c83b5b048f4e3004287f08713857a2f5 /js
parent75486be2839494c9b54833aff8f5eef3f9542151 (diff)
downloadninja-92ae17bc800cf82cdbd1482ef1af1a5fd7bd632a.tar.gz
Force layout canvas and SelectionController to update their info when a 2d canvas is replaced by a 3d canvas (and vice-versa).
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/controllers/elements/shapes-controller.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index ed45710d..3f1ccc3d 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -59,7 +59,11 @@ exports.ShapesController = Montage.create(CanvasController, {
59 break; 59 break;
60 case "useWebGl": 60 case "useWebGl":
61 var canvas = njModule.NJUtils.makeNJElement("canvas", "Canvas", "shape", el.className, true); 61 var canvas = njModule.NJUtils.makeNJElement("canvas", "Canvas", "shape", el.className, true);
62 canvas.width = el.width;
63 canvas.height = el.height;
62 this.application.ninja.elementMediator.replaceElement(el, canvas); 64 this.application.ninja.elementMediator.replaceElement(el, canvas);
65 NJevent("elementDeleted", el);
66 this.application.ninja.selectionController.selectElement(canvas);
63 el = canvas; 67 el = canvas;
64 this.toggleWebGlMode(el, value); 68 this.toggleWebGlMode(el, value);
65 el.elementModel.shapeModel.GLGeomObj.buildBuffers(); 69 el.elementModel.shapeModel.GLGeomObj.buildBuffers();