diff options
author | Nivesh Rajbhandari | 2012-02-01 21:14:17 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-01 21:14:17 -0800 |
commit | 01efeff045e7196bab37fc60f7030969ad650d6c (patch) | |
tree | cafdccd2b9ff511294cfd2a4ba2dc244b8ebb0d2 /js/tools | |
parent | 830b011d94d728882286d72e129f7405134957c7 (diff) | |
download | ninja-01efeff045e7196bab37fc60f7030969ad650d6c.tar.gz |
Removed border special-casing from PI since the mediator now handles this generically. Updated mediator's set stroke routine to use the setColor routine.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools')
-rw-r--r-- | js/tools/FillTool.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/js/tools/FillTool.js b/js/tools/FillTool.js index 477966da..fabcec69 100644 --- a/js/tools/FillTool.js +++ b/js/tools/FillTool.js | |||
@@ -54,10 +54,24 @@ exports.FillTool = Montage.create(ModifierToolBase, { | |||
54 | value: function(event) { | 54 | value: function(event) { |
55 | this.isDrawing = true; | 55 | this.isDrawing = true; |
56 | 56 | ||
57 | if(this._canColor) | 57 | if(this._canColor && this.application.ninja.selectedElements.length) |
58 | { | 58 | { |
59 | var color = this.application.ninja.colorController.colorToolbar.fill; | 59 | var color = this.application.ninja.colorController.colorToolbar.fill, |
60 | ElementsMediator.setColor(this.application.ninja.selectedElements, color, true, "Change", "fillTool"); | 60 | colorInfo; |
61 | if(color && color.color) | ||
62 | { | ||
63 | colorInfo = { mode:color.colorMode, | ||
64 | color:color.color | ||
65 | }; | ||
66 | ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, true, "Change", "fillTool"); | ||
67 | } | ||
68 | else | ||
69 | { | ||
70 | colorInfo = { mode:"nocolor", | ||
71 | color:color.color | ||
72 | }; | ||
73 | ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, true, "Change", "fillTool"); | ||
74 | } | ||
61 | } | 75 | } |
62 | } | 76 | } |
63 | } | 77 | } |