aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rw-r--r--js/controllers/elements/shapes-controller.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 74c88084..ed45710d 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -5,7 +5,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController; 8 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController,
9 njModule = require("js/lib/NJUtils");
9 10
10exports.ShapesController = Montage.create(CanvasController, { 11exports.ShapesController = Montage.create(CanvasController, {
11 12
@@ -57,9 +58,11 @@ exports.ShapesController = Montage.create(CanvasController, {
57 el.elementModel.shapeModel.GLGeomObj.buildBuffers(); 58 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
58 break; 59 break;
59 case "useWebGl": 60 case "useWebGl":
60// this.toggleWebGlMode(el, value); 61 var canvas = njModule.NJUtils.makeNJElement("canvas", "Canvas", "shape", el.className, true);
61// el.elementModel.shapeModel.GLGeomObj.buildBuffers(); 62 this.application.ninja.elementMediator.replaceElement(el, canvas);
62 el.elementModel.shapeModel.useWebGl = value; 63 el = canvas;
64 this.toggleWebGlMode(el, value);
65 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
63 break; 66 break;
64 default: 67 default:
65 CanvasController.setProperty(el, p, value); 68 CanvasController.setProperty(el, p, value);