aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/FillTool.js32
-rwxr-xr-xjs/tools/InkBottleTool.js10
2 files changed, 24 insertions, 18 deletions
diff --git a/js/tools/FillTool.js b/js/tools/FillTool.js
index 66dd9305..69807bc3 100755
--- a/js/tools/FillTool.js
+++ b/js/tools/FillTool.js
@@ -73,22 +73,28 @@ exports.FillTool = Montage.create(ModifierToolBase, {
73 this.isDrawing = true; 73 this.isDrawing = true;
74 74
75 if(this._canColor && this.application.ninja.selectedElements.length) { 75 if(this._canColor && this.application.ninja.selectedElements.length) {
76 var fillInfo = {},
77 color;
78 if(this.options.useFillColor.checked) {
79 fillInfo.colorInfo = {};
80 color = this.options.fill;
81 if(color && color.color)
82 {
83 fillInfo.colorInfo.mode = color.colorMode;
84 fillInfo.colorInfo.color = color.color;
85 } else {
86 fillInfo.colorInfo.mode = "nocolor";
87 fillInfo.colorInfo.color = null;
88 }
89 }
76 90
77 var color = this.options.fill, 91 if(this.options.useWebGL.checked) {
78 colorInfo; 92 fillInfo.webGLInfo = {};
79 if(color && color.color) 93 fillInfo.webGLInfo.material = this.options.fillMaterial.value;
80 {
81 colorInfo = { mode:color.colorMode,
82 color:color.color
83 };
84 } 94 }
85 else 95 if(fillInfo.colorInfo || fillInfo.webGLInfo) {
86 { 96 ElementsMediator.setFill(this.application.ninja.selectedElements, fillInfo, "Change", "fillTool");
87 colorInfo = { mode:"nocolor",
88 color:color.color
89 };
90 } 97 }
91 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, true, "Change", "fillTool");
92 } 98 }
93 } 99 }
94 } 100 }
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js
index 2c03d133..bb5d3ae2 100755
--- a/js/tools/InkBottleTool.js
+++ b/js/tools/InkBottleTool.js
@@ -87,18 +87,18 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, {
87 if(this.options.useBorderWidth.checked || this.options.useBorderStyle.checked) { 87 if(this.options.useBorderWidth.checked || this.options.useBorderStyle.checked) {
88 colorInfo.borderInfo = {}; 88 colorInfo.borderInfo = {};
89 if(this.options.useBorderWidth.checked) { 89 if(this.options.useBorderWidth.checked) {
90 colorInfo.borderInfo.borderWidth = this.options._borderWidth.value; 90 colorInfo.borderInfo.borderWidth = this.options.borderWidth.value;
91 colorInfo.borderInfo.borderUnits = this.options._borderWidth.units; 91 colorInfo.borderInfo.borderUnits = this.options.borderWidth.units;
92 } 92 }
93 if(this.options.useBorderStyle.checked) { 93 if(this.options.useBorderStyle.checked) {
94 colorInfo.borderInfo.borderStyle = this.options._borderStyle.value; 94 colorInfo.borderInfo.borderStyle = this.options.borderStyle.value;
95 } 95 }
96 } 96 }
97 97
98 if(this.options.useStrokeSize.checked) { 98 if(this.options.useStrokeSize.checked) {
99 colorInfo.strokeInfo = {}; 99 colorInfo.strokeInfo = {};
100 colorInfo.strokeInfo.strokeSize = this.options._strokeSize.value; 100 colorInfo.strokeInfo.strokeSize = this.options.strokeSize.value;
101 colorInfo.strokeInfo.strokeUnits = this.options._strokeSize.units; 101 colorInfo.strokeInfo.strokeUnits = this.options.strokeSize.units;
102 } 102 }
103 103
104 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool"); 104 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool");