diff options
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-x | js/lib/geom/rectangle.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js index e511d5f4..b01aea53 100755 --- a/js/lib/geom/rectangle.js +++ b/js/lib/geom/rectangle.js | |||
@@ -290,6 +290,21 @@ var Rectangle = function GLRectangle() { | |||
290 | this._strokeStyle = jObj.strokeStyle; | 290 | this._strokeStyle = jObj.strokeStyle; |
291 | var strokeMaterialName = jObj.strokeMat; | 291 | var strokeMaterialName = jObj.strokeMat; |
292 | var fillMaterialName = jObj.fillMat; | 292 | var fillMaterialName = jObj.fillMat; |
293 | |||
294 | var strokeMat = MaterialsModel.getMaterial( strokeMaterialName ); | ||
295 | if (!strokeMat) { | ||
296 | console.log( "object material not found in library: " + strokeMaterialName ); | ||
297 | strokeMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
298 | } | ||
299 | this._strokeMaterial = strokeMat; | ||
300 | |||
301 | var fillMat = MaterialsModel.getMaterial( fillMaterialName ); | ||
302 | if (!fillMat) { | ||
303 | console.log( "object material not found in library: " + fillMaterialName ); | ||
304 | fillMat = MaterialsModel.getMaterial( MaterialsModel.getDefaultMaterialName() ); | ||
305 | } | ||
306 | this._fillMaterial = fillMat; | ||
307 | |||
293 | this.importMaterialsJSON( jObj.materials ); | 308 | this.importMaterialsJSON( jObj.materials ); |
294 | }; | 309 | }; |
295 | 310 | ||