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.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index 7fa78b12..1073c2db 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -42,8 +42,8 @@ var Circle = function GLCircle() {
42 42
43 this._strokeWidth = strokeSize; 43 this._strokeWidth = strokeSize;
44 this._innerRadius = innerRadius; 44 this._innerRadius = innerRadius;
45 if (strokeColor) this._strokeColor = strokeColor; 45 this._strokeColor = strokeColor;
46 if (fillColor) this._fillColor = fillColor; 46 this._fillColor = fillColor;
47 47
48 this._strokeStyle = strokeStyle; 48 this._strokeStyle = strokeStyle;
49 } 49 }
@@ -631,6 +631,21 @@ var Circle = function GLCircle() {
631 this._strokeStyle = jObj.strokeStyle; 631 this._strokeStyle = jObj.strokeStyle;
632 var strokeMaterialName = jObj.strokeMat; 632 var strokeMaterialName = jObj.strokeMat;
633 var fillMaterialName = jObj.fillMat; 633 var fillMaterialName = jObj.fillMat;
634
635 var strokeMat = MaterialsModel.getMaterial( strokeMaterialName );
636 if (!strokeMat) {
637 console.log( "object material not found in library: " + strokeMaterialName );
638 strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
639 }
640 this._strokeMaterial = strokeMat;
641
642 var fillMat = MaterialsModel.getMaterial( fillMaterialName );
643 if (!fillMat) {
644 console.log( "object material not found in library: " + fillMaterialName );
645 fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
646 }
647 this._fillMaterial = fillMat;
648
634 this.importMaterialsJSON( jObj.materials ); 649 this.importMaterialsJSON( jObj.materials );
635 }; 650 };
636 651