aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/circle.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-29 15:52:08 -0700
committerNivesh Rajbhandari2012-03-29 17:04:06 -0700
commit5b4f6b1618cf571a6bce5a631f976a008e04a64e (patch)
treed073038b08d14884f87c7776e9e192256d414cfb /js/lib/geom/circle.js
parent6b61de58f0733b40f64ed996933ac89927e922a1 (diff)
downloadninja-5b4f6b1618cf571a6bce5a631f976a008e04a64e.tar.gz
Updated shapes to always check for its stroke and fill colors and materials instead of relying on the shapeModel cache because it can get out of sync.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-xjs/lib/geom/circle.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index d48bf98b..ee3e2abd 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -633,6 +633,21 @@ var Circle = function GLCircle() {
633 this._strokeStyle = jObj.strokeStyle; 633 this._strokeStyle = jObj.strokeStyle;
634 var strokeMaterialName = jObj.strokeMat; 634 var strokeMaterialName = jObj.strokeMat;
635 var fillMaterialName = jObj.fillMat; 635 var fillMaterialName = jObj.fillMat;
636
637 var strokeMat = MaterialsModel.getMaterial( strokeMaterialName );
638 if (!strokeMat) {
639 console.log( "object material not found in library: " + strokeMaterialName );
640 strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
641 }
642 this._strokeMaterial = strokeMat;
643
644 var fillMat = MaterialsModel.getMaterial( fillMaterialName );
645 if (!fillMat) {
646 console.log( "object material not found in library: " + fillMaterialName );
647 fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
648 }
649 this._fillMaterial = fillMat;
650
636 this.importMaterialsJSON( jObj.materials ); 651 this.importMaterialsJSON( jObj.materials );
637 }; 652 };
638 653