aboutsummaryrefslogtreecommitdiff
path: root/js/tools/InkBottleTool.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-27 15:05:38 -0700
committerPushkar Joshi2012-04-27 15:05:38 -0700
commitc8fc8e1bd1c394f433b4fc1677f4bc596e7cc2cc (patch)
tree74fcb9818a917d4f8ddb0db0c78a8cff9af86339 /js/tools/InkBottleTool.js
parent28d1594b868e3c08e5603adbd5b29df1e24d57e9 (diff)
parentc8fac64d4ad8ac18744a17a5e0f0d17204355fd6 (diff)
downloadninja-c8fc8e1bd1c394f433b4fc1677f4bc596e7cc2cc.tar.gz
Merge branch 'master' into pentool
Diffstat (limited to 'js/tools/InkBottleTool.js')
-rwxr-xr-xjs/tools/InkBottleTool.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js
index 95c2e71d..fd17f4d6 100755
--- a/js/tools/InkBottleTool.js
+++ b/js/tools/InkBottleTool.js
@@ -16,7 +16,7 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, {
16 HandleMouseMove: { 16 HandleMouseMove: {
17 value : function (event) 17 value : function (event)
18 { 18 {
19 var obj = this.application.ninja.stage.GetSelectableElement(event); 19 var obj = this.application.ninja.stage.getElement(event, true);
20 var cursor = "url('images/cursors/ink.png') 6 11, default"; 20 var cursor = "url('images/cursors/ink.png') 6 11, default";
21 var canColor = true; 21 var canColor = true;
22 if (obj) 22 if (obj)
@@ -84,14 +84,22 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, {
84 }; 84 };
85 } 85 }
86 86
87 colorInfo.borderInfo = { borderStyle:this.options._borderStyle.value, 87 if(this.options.useBorderWidth.checked || this.options.useBorderStyle.checked) {
88 borderWidth:this.options._borderWidth.value, 88 colorInfo.borderInfo = {};
89 borderUnits:this.options._borderWidth.units 89 if(this.options.useBorderWidth.checked) {
90 }; 90 colorInfo.borderInfo.borderWidth = this.options._borderWidth.value;
91 colorInfo.borderInfo.borderUnits = this.options._borderWidth.units;
92 }
93 if(this.options.useBorderStyle.checked) {
94 colorInfo.borderInfo.borderStyle = this.options._borderStyle.value;
95 }
96 }
91 97
92 colorInfo.strokeInfo = { strokeSize:this.options._strokeSize.value, 98 if(this.options.useStrokeSize.checked) {
93 strokeUnits:this.options._strokeSize.units 99 colorInfo.strokeInfo = {};
94 }; 100 colorInfo.strokeInfo.strokeSize = this.options._strokeSize.value;
101 colorInfo.strokeInfo.strokeUnits = this.options._strokeSize.units;
102 }
95 103
96 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool"); 104 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool");
97 } 105 }