diff options
author | Nivesh Rajbhandari | 2012-07-09 11:43:36 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-07-09 11:43:36 -0700 |
commit | ac27d538af33ca8d67d3d88729f49c05793afda7 (patch) | |
tree | 4be9251ff087e93a37b1f463ae9eaaaf779caeeb /js/lib/geom/line.js | |
parent | eff1851b2189bea8b89065980d02541cecea5ddf (diff) | |
download | ninja-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/lib/geom/line.js')
-rwxr-xr-x | js/lib/geom/line.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/js/lib/geom/line.js b/js/lib/geom/line.js index a016d7a3..f782f2a8 100755 --- a/js/lib/geom/line.js +++ b/js/lib/geom/line.js | |||
@@ -63,8 +63,17 @@ exports.Line = Object.create(GeomObj, { | |||
63 | this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; | 63 | this._materialSpecular = [0.4, 0.4, 0.4, 1.0]; |
64 | 64 | ||
65 | if(strokeMaterial) { | 65 | if(strokeMaterial) { |
66 | this._strokeMaterial = strokeMaterial; | 66 | this._strokeMaterial = strokeMaterial.dup(); |
67 | if (strokeColor && this._strokeMaterial.hasProperty( "color" )) this._strokeMaterial.setProperty( "color", this._strokeColor ); | 67 | } else { |
68 | this._strokeMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup(); | ||
69 | } | ||
70 | |||
71 | if(strokeColor) { | ||
72 | if(this._strokeMaterial.hasProperty("color")) { | ||
73 | this._strokeMaterial.setProperty( "color", this._strokeColor ); | ||
74 | } else if (this._strokeMaterial && (this._strokeMaterial.gradientType === this._strokeColor.gradientMode)) { | ||
75 | this._strokeMaterial.setGradientData(this._strokeColor.color); | ||
76 | } | ||
68 | } | 77 | } |
69 | } | 78 | } |
70 | }, | 79 | }, |