aboutsummaryrefslogtreecommitdiff
path: root/js/tools/FillTool.js
diff options
context:
space:
mode:
authorAnanya Sen2012-06-05 16:13:49 -0700
committerAnanya Sen2012-06-05 16:13:49 -0700
commit71ee2afc745277a8459c0c82d0829f1302956122 (patch)
treecca1a92b8fe4b39d3f179add496205c113ac6024 /js/tools/FillTool.js
parente82a0dac35fcea2d1ce7bcbb3e89c822c87d774f (diff)
parentb23a684a6aba38946867463bbbf4184ba2a2ff4a (diff)
downloadninja-71ee2afc745277a8459c0c82d0829f1302956122.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into bugfix-master
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 }