aboutsummaryrefslogtreecommitdiff
path: root/js/tools/FillTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/FillTool.js')
-rwxr-xr-xjs/tools/FillTool.js32
1 files changed, 19 insertions, 13 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 }