aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/element-mediator.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 897b2771..e711e632 100755
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -294,10 +294,10 @@ exports.ElementMediator = Montage.create(Component, {
294 @param stageRedraw: *OPTIONAL*: True. If set to false the stage will not redraw the selection/outline 294 @param stageRedraw: *OPTIONAL*: True. If set to false the stage will not redraw the selection/outline
295 */ 295 */
296 setColor: { 296 setColor: {
297 value: function(els, value, isFill, eventType, source, currentValue) { 297 value: function(els, value, isFill, eventType, source, currentValue,borderSide) {
298 298
299 if(eventType === "Changing") { 299 if(eventType === "Changing") {
300 this._setColor(els, value, isFill, eventType, source); 300 this._setColor(els, value, isFill, eventType, source,borderSide);
301 } else { 301 } else {
302 // Calculate currentValue if not found for each element 302 // Calculate currentValue if not found for each element
303 if(!currentValue) { 303 if(!currentValue) {
@@ -316,11 +316,12 @@ exports.ElementMediator = Montage.create(Component, {
316 _source: { value: "undo-redo"}, 316 _source: { value: "undo-redo"},
317 description: { value: "Set Color"}, 317 description: { value: "Set Color"},
318 receiver: { value: this}, 318 receiver: { value: this},
319 _borderSide: { value: borderSide},
319 320
320 execute: { 321 execute: {
321 value: function(senderObject) { 322 value: function(senderObject) {
322 if(senderObject) this._source = senderObject; 323 if(senderObject) this._source = senderObject;
323 this.receiver._setColor(this._els, this._value, this._isFill, this._eventType, this._source); 324 this.receiver._setColor(this._els, this._value, this._isFill, this._eventType, this._source,this._borderSide);
324 this._source = "undo-redo"; 325 this._source = "undo-redo";
325 return ""; 326 return "";
326 } 327 }
@@ -342,12 +343,12 @@ exports.ElementMediator = Montage.create(Component, {
342 }, 343 },
343 344
344 _setColor: { 345 _setColor: {
345 value: function(els, value, isFill, eventType, source) { 346 value: function(els, value, isFill, eventType, source,borderSide) {
346 for(var i=0, item; item = els[i]; i++) { 347 for(var i=0, item; item = els[i]; i++) {
347 item.elementModel.controller["setColor"](item, value, isFill); 348 item.elementModel.controller["setColor"](item, value, isFill,borderSide);
348 } 349 }
349 350
350 NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null}); 351 NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill, "borderSide":borderSide}, redraw: null});
351 } 352 }
352 }, 353 },
353 354