aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 74353454..5920d51a 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -138,6 +138,10 @@ exports.ShapesController = Montage.create(CanvasController, {
138 this.application.ninja.elementMediator.replaceElement(canvas, el); 138 this.application.ninja.elementMediator.replaceElement(canvas, el);
139 break; 139 break;
140 case "strokeMaterial": 140 case "strokeMaterial":
141 // skip shape types that don't support WebGL
142 if(!el.elementModel.shapeModel.GLGeomObj.useWebGl) {
143 return;
144 }
141 m = Object.create(MaterialsModel.getMaterial(value)); 145 m = Object.create(MaterialsModel.getMaterial(value));
142 if(m) 146 if(m)
143 { 147 {
@@ -152,6 +156,10 @@ exports.ShapesController = Montage.create(CanvasController, {
152 } 156 }
153 break; 157 break;
154 case "fillMaterial": 158 case "fillMaterial":
159 // skip shape types that don't support WebGL or fill color
160 if(!el.elementModel.shapeModel.GLGeomObj.canFill || !el.elementModel.shapeModel.GLGeomObj.useWebGl) {
161 return;
162 }
155 m = Object.create(MaterialsModel.getMaterial(value)); 163 m = Object.create(MaterialsModel.getMaterial(value));
156 if(m) 164 if(m)
157 { 165 {