From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- js/tools/InkBottleTool.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 js/tools/InkBottleTool.js (limited to 'js/tools/InkBottleTool.js') diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 2edf68e0de786cdc92d5f41548fd61e6c77a57ec Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 13 Feb 2012 09:56:40 -0800 Subject: Updated ink bottle tool to use new setColor routine in the mediator and controllers. Signed-off-by: Nivesh Rajbhandari --- js/tools/InkBottleTool.js | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'js/tools/InkBottleTool.js') diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js index cc20d94c..2be74ada 100644 --- a/js/tools/InkBottleTool.js +++ b/js/tools/InkBottleTool.js @@ -48,20 +48,33 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, { value: function(event) { this.isDrawing = true; - if(this._canColor) + if(this._canColor && this.application.ninja.selectedElements.length) { -// var color = this.application.ninja.colorController.colorToolbar.stroke; -// ElementsMediator.setColor(this.application.ninja.selectedElements, color, false, "Change", "inkBottleTool"); + var color = this.application.ninja.colorController.colorToolbar.stroke, + colorInfo; + if(color && color.color) + { + colorInfo = { mode:color.colorMode, + color:color.color + }; + } + else + { + colorInfo = { mode:"nocolor", + color:color.color + }; + } + + colorInfo.borderInfo = { borderStyle:this.options._borderStyle.value, + borderWidth:this.options._borderWidth.value, + borderUnits:this.options._borderWidth.units + }; - var strokeInfo = { borderStyle:this.options._borderStyle.value, - borderWidth:this.options._borderWidth.value, - borderUnits:this.options._borderWidth.units, - strokeSize:this.options._strokeSize.value, - strokeUnits:this.options._strokeSize.units, - color:this.application.ninja.colorController.colorToolbar.stroke - }; + colorInfo.strokeInfo = { strokeSize:this.options._strokeSize.value, + strokeUnits:this.options._strokeSize.units + }; - ElementsMediator.setStroke(this.application.ninja.selectedElements, strokeInfo, "Change", "inkBottleTool"); + ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool"); } } } -- cgit v1.2.3