diff options
author | Nivesh Rajbhandari | 2012-02-06 16:35:12 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-06 16:35:12 -0800 |
commit | 92ae17bc800cf82cdbd1482ef1af1a5fd7bd632a (patch) | |
tree | 2e1ef434c83b5b048f4e3004287f08713857a2f5 | |
parent | 75486be2839494c9b54833aff8f5eef3f9542151 (diff) | |
download | ninja-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>
-rw-r--r-- | js/controllers/elements/shapes-controller.js | 4 |
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(); |