initial : function()
{
+ this.selectedBrick = [];
+
this.currentSize = this.el.getBox(true);
Roo.EventManager.onWindowResize(this.resize, this);
var containerWidth = this.containerWidth;
var cols = Math.floor(containerWidth / boxWidth);
- Roo.log(cols);
+
this.cols = Math.max( cols, 1 );
this.cols = this.maxCols > 0 ? Math.min( this.cols, this.maxCols ) : this.cols;
this.colWidth = boxWidth + avail - this.padWidth;
- this.unitWidth = Math.floor((this.colWidth - (this.gutter * 2)) / 3);
+ this.unitWidth = Math.round((this.colWidth - (this.gutter * 2)) / 3);
this.unitHeight = this.boxHeight > 0 ? this.boxHeight : this.unitWidth;
},
b.el.setWidth(width);
b.el.setHeight(height);
+
+ b.el.select('iframe',true).first().set('width', width);
+ b.el.select('iframe',true).first().set(height);
// iframe?
- b.el.select('iframe',true).setSize(width,height);
+// b.el.select('iframe',true).setSize(width,height);
}, this);
for (var i = 0; i<this.bricks.length; i++) {
if (this.bricks[i].id == brick_id) {
this.bricks.splice(i,1);
- this.selectedBrick=[];
this.el.dom.removeChild(Roo.get(brick_id).dom);
this.initial();
}
var cn = new Roo.bootstrap.MasonryBrick(cfg);
//this.register(cn);
cn.parentId = this.id;
- cn.onRender(this.el, null);
+ cn.render(this.el);
return cn;
},