aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/rectangle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-xjs/lib/geom/rectangle.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 00c40eb9..91b1d426 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -231,6 +231,21 @@ var Rectangle = function GLRectangle() {
231 this._strokeStyle = jObj.strokeStyle; 231 this._strokeStyle = jObj.strokeStyle;
232 var strokeMaterialName = jObj.strokeMat; 232 var strokeMaterialName = jObj.strokeMat;
233 var fillMaterialName = jObj.fillMat; 233 var fillMaterialName = jObj.fillMat;
234
235 var strokeMat = MaterialsModel.getMaterial( strokeMaterialName );
236 if (!strokeMat) {
237 console.log( "object material not found in library: " + strokeMaterialName );
238 strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
239 }
240 this._strokeMaterial = strokeMat;
241
242 var fillMat = MaterialsModel.getMaterial( fillMaterialName );
243 if (!fillMat) {
244 console.log( "object material not found in library: " + fillMaterialName );
245 fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() );
246 }
247 this._fillMaterial = fillMat;
248
234 this.importMaterialsJSON( jObj.materials ); 249 this.importMaterialsJSON( jObj.materials );
235 }; 250 };
236 251