diff options
Diffstat (limited to 'js/mediators/element-mediator.js')
-rwxr-xr-x | js/mediators/element-mediator.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 7d5040ef..6449a625 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -315,10 +315,10 @@ exports.ElementMediator = Montage.create(Component, { | |||
315 | @param stageRedraw: *OPTIONAL*: True. If set to false the stage will not redraw the selection/outline | 315 | @param stageRedraw: *OPTIONAL*: True. If set to false the stage will not redraw the selection/outline |
316 | */ | 316 | */ |
317 | setColor: { | 317 | setColor: { |
318 | value: function(els, value, isFill, eventType, source, currentValue) { | 318 | value: function(els, value, isFill, eventType, source, currentValue,borderSide) { |
319 | 319 | ||
320 | if(eventType === "Changing") { | 320 | if(eventType === "Changing") { |
321 | this._setColor(els, value, isFill, eventType, source); | 321 | this._setColor(els, value, isFill, eventType, source,borderSide); |
322 | } else { | 322 | } else { |
323 | // Calculate currentValue if not found for each element | 323 | // Calculate currentValue if not found for each element |
324 | if(!currentValue) { | 324 | if(!currentValue) { |
@@ -337,11 +337,12 @@ exports.ElementMediator = Montage.create(Component, { | |||
337 | _source: { value: "undo-redo"}, | 337 | _source: { value: "undo-redo"}, |
338 | description: { value: "Set Color"}, | 338 | description: { value: "Set Color"}, |
339 | receiver: { value: this}, | 339 | receiver: { value: this}, |
340 | _borderSide: { value: borderSide}, | ||
340 | 341 | ||
341 | execute: { | 342 | execute: { |
342 | value: function(senderObject) { | 343 | value: function(senderObject) { |
343 | if(senderObject) this._source = senderObject; | 344 | if(senderObject) this._source = senderObject; |
344 | this.receiver._setColor(this._els, this._value, this._isFill, this._eventType, this._source); | 345 | this.receiver._setColor(this._els, this._value, this._isFill, this._eventType, this._source,this._borderSide); |
345 | this._source = "undo-redo"; | 346 | this._source = "undo-redo"; |
346 | return ""; | 347 | return ""; |
347 | } | 348 | } |
@@ -363,9 +364,9 @@ exports.ElementMediator = Montage.create(Component, { | |||
363 | }, | 364 | }, |
364 | 365 | ||
365 | _setColor: { | 366 | _setColor: { |
366 | value: function(els, value, isFill, eventType, source) { | 367 | value: function(els, value, isFill, eventType, source,borderSide) { |
367 | for(var i=0, item; item = els[i]; i++) { | 368 | for(var i=0, item; item = els[i]; i++) { |
368 | item.elementModel.controller["setColor"](item, value, isFill); | 369 | item.elementModel.controller["setColor"](item, value, isFill,borderSide); |
369 | } | 370 | } |
370 | 371 | ||
371 | NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null}); | 372 | NJevent("element" + eventType, {type : "setColor", source: source, data: {"els": els, "prop": "color", "value": value, "isFill": isFill}, redraw: null}); |