aboutsummaryrefslogtreecommitdiff
path: root/js/tools/ShapeTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/ShapeTool.js')
-rwxr-xr-xjs/tools/ShapeTool.js18
1 files changed, 4 insertions, 14 deletions
diff --git a/js/tools/ShapeTool.js b/js/tools/ShapeTool.js
index 6ff61546..3cd75be2 100755
--- a/js/tools/ShapeTool.js
+++ b/js/tools/ShapeTool.js
@@ -211,26 +211,16 @@ exports.ShapeTool = Montage.create(DrawingTool, {
211 } 211 }
212 }, 212 },
213 213
214 // We can draw on an existing canvas unless it has only a single shape object
215 setColor: { 214 setColor: {
216 value: function(stroke, fill, canvas, toolId) 215 value: function(canvas, color, isFill, toolId)
217 { 216 {
218 if(stroke && stroke.color) 217 if(color && color.color)
219 { 218 {
220 this.application.ninja.elementMediator.setColor([canvas], {mode:stroke.colorMode, color:stroke.color}, false, "Change", toolId); 219 this.application.ninja.elementMediator.setColor([canvas], {mode:color.colorMode, color:color.color}, isFill, "Change", toolId);
221 } 220 }
222 else 221 else
223 { 222 {
224 this.application.ninja.elementMediator.setColor([canvas], {mode:"nocolor", color:null}, false, "Change", toolId); 223 this.application.ninja.elementMediator.setColor([canvas], {mode:"nocolor", color:null}, isFill, "Change", toolId);
225 }
226
227 if(fill && fill.color)
228 {
229 this.application.ninja.elementMediator.setColor([canvas], {mode:fill.colorMode, color:fill.color}, true, "Change", toolId);
230 }
231 else
232 {
233 this.application.ninja.elementMediator.setColor([canvas], {mode:"nocolor", color:null}, true, "Change", toolId);
234 } 224 }
235 } 225 }
236 } 226 }