aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-07-09 11:43:36 -0700
committerNivesh Rajbhandari2012-07-09 11:43:36 -0700
commitac27d538af33ca8d67d3d88729f49c05793afda7 (patch)
tree4be9251ff087e93a37b1f463ae9eaaaf779caeeb /js/tools/LineTool.js
parenteff1851b2189bea8b89065980d02541cecea5ddf (diff)
downloadninja-ac27d538af33ca8d67d3d88729f49c05793afda7.tar.gz
PI, drawing and editing fixes for shapes and materials.
IKNinja-1841 - Cannot change webgl shape with LinearGradient and RadialGradient to solid color. IKNINJA-1851 - Cannot draw webgl shapes with Linear/RadialGradient material. IKNINJA-1864 - PI doesn't update the color of shape if WebGL material switches to Flat. IKNINJA-1886 - Gradient edits not applied to WebGL Stage object. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-xjs/tools/LineTool.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 413c0302..f9f2f817 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -244,7 +244,11 @@ exports.LineTool = Montage.create(ShapeTool, {
244 { 244 {
245 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 245 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
246 } 246 }
247 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 247 if (strokeMaterial && this.options.stroke.color && (strokeMaterial.gradientType === this.options.stroke.color.gradientMode)) {
248 strokeColor = {gradientMode:strokeMaterial.gradientType, color:this.options.stroke.color.stops};
249 } else {
250 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor;
251 }
248 } 252 }
249 253
250 var world = this.getGLWorld(canvas, this.options.use3D); 254 var world = this.getGLWorld(canvas, this.options.use3D);