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.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 3f1ccc3d..21373aca 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -68,6 +68,24 @@ exports.ShapesController = Montage.create(CanvasController, {
68 this.toggleWebGlMode(el, value); 68 this.toggleWebGlMode(el, value);
69 el.elementModel.shapeModel.GLGeomObj.buildBuffers(); 69 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
70 break; 70 break;
71 case "strokeMaterial":
72 var sm = Object.create(MaterialsLibrary.getMaterial(value));
73 if(sm)
74 {
75 el.elementModel.shapeModel.GLGeomObj.setStrokeMaterial(sm);
76 el.elementModel.shapeModel.strokeMaterial = sm;
77 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
78 }
79 break;
80 case "fillMaterial":
81 var fm = Object.create(MaterialsLibrary.getMaterial(value));
82 if(fm)
83 {
84 el.elementModel.shapeModel.GLGeomObj.setFillMaterial(fm);
85 el.elementModel.shapeModel.strokeMaterial = fm;
86 el.elementModel.shapeModel.GLGeomObj.buildBuffers();
87 }
88 break;
71 default: 89 default:
72 CanvasController.setProperty(el, p, value); 90 CanvasController.setProperty(el, p, value);
73 } 91 }
@@ -84,12 +102,13 @@ exports.ShapesController = Montage.create(CanvasController, {
84 case "trRadius": 102 case "trRadius":
85 case "blRadius": 103 case "blRadius":
86 case "brRadius": 104 case "brRadius":
87 case "strokeMaterial":
88 case "fillMaterial":
89 case "border": 105 case "border":
90 case "background": 106 case "background":
91 case "useWebGl": 107 case "useWebGl":
92 return this.getShapeProperty(el, p); 108 return this.getShapeProperty(el, p);
109 case "strokeMaterial":
110 case "fillMaterial":
111 return this.getShapeProperty(el, p).getName();
93 default: 112 default:
94 return CanvasController.getProperty(el, p); 113 return CanvasController.getProperty(el, p);
95 } 114 }