aboutsummaryrefslogtreecommitdiff
path: root/js/tools/FillTool.js
diff options
context:
space:
mode:
authorJonathan Duran2012-06-06 11:22:43 -0700
committerJonathan Duran2012-06-06 11:22:43 -0700
commit020a8147088f09547b7e84db2ada7c48f25c089f (patch)
tree5ec53061c4437d7a7cd8c983ef8a17aa6cfe0e19 /js/tools/FillTool.js
parentb73cc6e348f3eb4cd57b5afeb7a6f5d3633b7e6b (diff)
parent18e212dca48066d1ddaca96875a3f40adcc859b6 (diff)
downloadninja-020a8147088f09547b7e84db2ada7c48f25c089f.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
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 }