if(this.bgimage.length){
this.imageEl = this.el.select('.roo-brick-image-view', true).first();
- this.imageEl.on('load', this.onBgLoad, this);
+ this.imageEl.on('load', this.onImageLoad, this);
return;
}
this.resize();
},
- onBgLoad : function()
+ onImageLoad : function()
{
- Roo.log('on bg load');
+ this.resize();
},
resize : function()
paragraph.setHeight(paragraph.getWidth() + paragraph.getPadding('tb'));
- Roo.log("paragraph.getWidth() + paragraph.getPadding('tb')");
- Roo.log(paragraph.getWidth() + paragraph.getPadding('tb'));
-
if(this.bgimage.length){
var image = this.el.select('.roo-brick-image-view', true).first();
+
image.setWidth(paragraph.getWidth());
-// image.setHeight(paragraph.getWidth());
- Roo.log('image.getHeight()');
- Roo.log(image.getHeight());
+
+ if(this.square){
+ image.setHeight(paragraph.getWidth());
+ }
this.el.setHeight(image.getHeight());
paragraph.setHeight(image.getHeight());