diff options
author | Ananya Sen | 2012-02-23 13:52:32 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-23 13:52:32 -0800 |
commit | ec3d07c2fea4e79c68606234074f43d694982e5b (patch) | |
tree | dc7c830c361d35c04a4d9b6d55c6c36d7a5d61cd /js/tools/InkBottleTool.js | |
parent | 7283884c39df537694b21419a3ea9e3ca7793b4b (diff) | |
parent | 287a0bad5b774a380ec6c8b3ddf24dc03234e248 (diff) | |
download | ninja-ec3d07c2fea4e79c68606234074f43d694982e5b.tar.gz |
Merge branch 'refs/heads/FileIO-jose' into FileIO
Conflicts:
js/document/html-document.js
js/helper-classes/3D/snap-manager.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/tools/InkBottleTool.js')
-rwxr-xr-x | js/tools/InkBottleTool.js | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js index cc20d94c..2be74ada 100755 --- a/js/tools/InkBottleTool.js +++ b/js/tools/InkBottleTool.js | |||
@@ -48,20 +48,33 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, { | |||
48 | value: function(event) { | 48 | value: function(event) { |
49 | this.isDrawing = true; | 49 | this.isDrawing = true; |
50 | 50 | ||
51 | if(this._canColor) | 51 | if(this._canColor && this.application.ninja.selectedElements.length) |
52 | { | 52 | { |
53 | // var color = this.application.ninja.colorController.colorToolbar.stroke; | 53 | var color = this.application.ninja.colorController.colorToolbar.stroke, |
54 | // ElementsMediator.setColor(this.application.ninja.selectedElements, color, false, "Change", "inkBottleTool"); | 54 | colorInfo; |
55 | if(color && color.color) | ||
56 | { | ||
57 | colorInfo = { mode:color.colorMode, | ||
58 | color:color.color | ||
59 | }; | ||
60 | } | ||
61 | else | ||
62 | { | ||
63 | colorInfo = { mode:"nocolor", | ||
64 | color:color.color | ||
65 | }; | ||
66 | } | ||
67 | |||
68 | colorInfo.borderInfo = { borderStyle:this.options._borderStyle.value, | ||
69 | borderWidth:this.options._borderWidth.value, | ||
70 | borderUnits:this.options._borderWidth.units | ||
71 | }; | ||
55 | 72 | ||
56 | var strokeInfo = { borderStyle:this.options._borderStyle.value, | 73 | colorInfo.strokeInfo = { strokeSize:this.options._strokeSize.value, |
57 | borderWidth:this.options._borderWidth.value, | 74 | strokeUnits:this.options._strokeSize.units |
58 | borderUnits:this.options._borderWidth.units, | 75 | }; |
59 | strokeSize:this.options._strokeSize.value, | ||
60 | strokeUnits:this.options._strokeSize.units, | ||
61 | color:this.application.ninja.colorController.colorToolbar.stroke | ||
62 | }; | ||
63 | 76 | ||
64 | ElementsMediator.setStroke(this.application.ninja.selectedElements, strokeInfo, "Change", "inkBottleTool"); | 77 | ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool"); |
65 | } | 78 | } |
66 | } | 79 | } |
67 | } | 80 | } |