aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/circle.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-17 14:49:18 -0700
committerPushkar Joshi2012-04-17 14:49:18 -0700
commitdf903a01e14134cadf109b733d09c6eadfa3966b (patch)
tree2351f1c05b2f852053fa0be533072088a9ad4e7c /js/lib/geom/circle.js
parent036cf034e124dbc1f4893e90f7c6d240904a3faf (diff)
parentcacb4a21825818af392c2949967b0f3c1df509c5 (diff)
downloadninja-df903a01e14134cadf109b733d09c6eadfa3966b.tar.gz
Merge branch 'master' into pentool
Conflicts: js/tools/PenTool.js
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