aboutsummaryrefslogtreecommitdiff
path: root/js/tools/FillTool.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-07 16:55:34 -0800
committerArmen Kesablyan2012-02-07 16:55:34 -0800
commit10f0ad4c15f090b2d0d50d11e4c7aaf291e9eb0e (patch)
tree12b31910a3c7c7fa2ee0b26d8aaa611710e139a5 /js/tools/FillTool.js
parent7f8730c3add146f1ba107e6fc22d1f5a8348ed8b (diff)
parent668510892537eaaeb2e11520831d87b44b2489b7 (diff)
downloadninja-10f0ad4c15f090b2d0d50d11e4c7aaf291e9eb0e.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into text-tool
Conflicts: _scss/compass_app_log.txt css/ninja.css
Diffstat (limited to 'js/tools/FillTool.js')
-rw-r--r--js/tools/FillTool.js20
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 }