diff options
Diffstat (limited to 'js/controllers/elements')
-rw-r--r-- | js/controllers/elements/element-controller.js | 13 | ||||
-rw-r--r-- | js/controllers/elements/shapes-controller.js | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 65d26bdd..5eb75613 100644 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -115,6 +115,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent, | |||
115 | } | 115 | } |
116 | else | 116 | else |
117 | { | 117 | { |
118 | // TODO - Need to update border style and width also | ||
118 | el.elementModel.stroke = colorObj; | 119 | el.elementModel.stroke = colorObj; |
119 | } | 120 | } |
120 | 121 | ||
@@ -159,10 +160,22 @@ var ElementController = exports.ElementController = Montage.create(NJComponent, | |||
159 | case 'gradient': | 160 | case 'gradient': |
160 | this.setProperty(el, "border-image", color.color.css); | 161 | this.setProperty(el, "border-image", color.color.css); |
161 | this.setProperty(el, "border-color", "none"); | 162 | this.setProperty(el, "border-color", "none"); |
163 | if(color.borderInfo) | ||
164 | { | ||
165 | this.setProperty(el, "border-width", color.borderInfo.borderWidth + | ||
166 | color.borderInfo.borderUnits); | ||
167 | this.setProperty(el, "border-style", color.borderInfo.borderStyle); | ||
168 | } | ||
162 | break; | 169 | break; |
163 | default: | 170 | default: |
164 | this.setProperty(el, "border-image", "none"); | 171 | this.setProperty(el, "border-image", "none"); |
165 | this.setProperty(el, "border-color", color.color.css); | 172 | this.setProperty(el, "border-color", color.color.css); |
173 | if(color.borderInfo) | ||
174 | { | ||
175 | this.setProperty(el, "border-width", color.borderInfo.borderWidth + | ||
176 | color.borderInfo.borderUnits); | ||
177 | this.setProperty(el, "border-style", color.borderInfo.borderStyle); | ||
178 | } | ||
166 | } | 179 | } |
167 | } | 180 | } |
168 | el.elementModel.stroke = color; | 181 | el.elementModel.stroke = color; |
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 640119c4..42c2528f 100644 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -260,6 +260,14 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
260 | el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); | 260 | el.elementModel.shapeModel.GLGeomObj.setStrokeColor(webGl); |
261 | this.setShapeProperty(el, "stroke", webGl); | 261 | this.setShapeProperty(el, "stroke", webGl); |
262 | this.setShapeProperty(el, "border", color); | 262 | this.setShapeProperty(el, "border", color); |
263 | if(color.strokeInfo) | ||
264 | { | ||
265 | var strokeWidth = this.GetValueInPixels(color.strokeInfo.strokeSize, | ||
266 | color.strokeInfo.strokeUnits); | ||
267 | el.elementModel.shapeModel.GLGeomObj.setStrokeWidth(strokeWidth); | ||
268 | this.setShapeProperty(el, "strokeSize", color.strokeInfo.strokeSize + " " | ||
269 | + color.strokeInfo.strokeUnits); | ||
270 | } | ||
263 | } | 271 | } |
264 | el.elementModel.shapeModel.GLWorld.render(); | 272 | el.elementModel.shapeModel.GLWorld.render(); |
265 | } | 273 | } |