aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-xjs/lib/geom/circle.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index 086c1058..848ae10d 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -61,14 +61,28 @@ exports.Circle = Object.create(GeomObj, {
61 } else { 61 } else {
62 this._strokeMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup(); 62 this._strokeMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup();
63 } 63 }
64 if (strokeColor && this._strokeMaterial.hasProperty( "color" )) this._strokeMaterial.setProperty( "color", this._strokeColor ); 64
65 if(strokeColor) {
66 if(this._strokeMaterial.hasProperty("color")) {
67 this._strokeMaterial.setProperty( "color", this._strokeColor );
68 } else if (this._strokeMaterial && (this._strokeMaterial.gradientType === this._strokeColor.gradientMode)) {
69 this._strokeMaterial.setGradientData(this._strokeColor.color);
70 }
71 }
65 72
66 if(fillMaterial) { 73 if(fillMaterial) {
67 this._fillMaterial = fillMaterial.dup(); 74 this._fillMaterial = fillMaterial.dup();
68 } else { 75 } else {
69 this._fillMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup(); 76 this._fillMaterial = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ).dup();
77 }
78
79 if(fillColor) {
80 if(this._fillMaterial.hasProperty("color")) {
81 this._fillMaterial.setProperty( "color", this._fillColor );
82 } else if (this._fillMaterial && (this._fillMaterial.gradientType === this._fillColor.gradientMode)) {
83 this._fillMaterial.setGradientData(this._fillColor.color);
84 }
70 } 85 }
71 if (fillColor && this._fillMaterial.hasProperty( "color" )) this._fillMaterial.setProperty( "color", this._fillColor );
72 } 86 }
73 }, 87 },
74 88