aboutsummaryrefslogtreecommitdiff
path: root/js/tools/ShapeTool.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-28 17:54:15 -0700
committerNivesh Rajbhandari2012-06-28 17:54:15 -0700
commite3eb68c3a0b911acd873ee6211931b8f4e620030 (patch)
treea0b1fa11fb6bca1c232adff0f52a19d71404984a /js/tools/ShapeTool.js
parentb4b54f6cc084b3f7483ebed1e15c1b4770949d58 (diff)
downloadninja-e3eb68c3a0b911acd873ee6211931b8f4e620030.tar.gz
Fixed not being able to draw linear and radial gradients. Also fixed IKNINJA-1721 - File dirty marker does not show when modifying elements and IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects. Squashed commit of the following:
commit 7cad082c89911d34a99feeef8e91d22b89cae8f1 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Thu Jun 28 17:52:07 2012 -0700 Fix for not being able to draw linear and radial gradient materials. I'm turning off pre-flight support of gradients for WebGL since it conflicts with the materials' color support. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit d0df8a2bff052d855bafb7885792b1dfff8eab7d Merge: 2c67d26 b4b54f6 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Thu Jun 28 17:50:11 2012 -0700 Merge branch 'refs/heads/ninja-internal' into ToolFixes commit 2c67d264851f0897fdca8ca887c1c82d0e434217 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Thu Jun 28 15:06:13 2012 -0700 IKNINJA-1721 - File dirty marker does not show when modifying elements. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> commit bb4b6a52eb75efb2f435cdb53f810ae3bc1f1fc3 Author: Nivesh Rajbhandari <mqg734@motorola.com> Date: Thu Jun 28 11:15:34 2012 -0700 IKNinja-1581 and IKNinja-1758 - Paint bucket fill bugs with lines and brush objects. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com> Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
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 }