X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fbootstrap%2FLayoutMasonry.js;h=281ec2dd4715afea2d11a2f98465e8247b2b89fd;hb=bbcf546f87d4e1f1f5d9c4508331421bb3ddc851;hp=e33f6d61d8076270cd36d0a980a0f5c1a1b940ee;hpb=1930314d1d72cf645dc90918047a8d8b9164843e;p=roojs1 diff --git a/Roo/bootstrap/LayoutMasonry.js b/Roo/bootstrap/LayoutMasonry.js index e33f6d61d8..281ec2dd47 100644 --- a/Roo/bootstrap/LayoutMasonry.js +++ b/Roo/bootstrap/LayoutMasonry.js @@ -149,6 +149,8 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, { initial : function() { + this.selectedBrick = []; + this.currentSize = this.el.getBox(true); Roo.EventManager.onWindowResize(this.resize, this); @@ -239,7 +241,7 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, { 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; }, @@ -661,8 +663,11 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, { b.el.setWidth(width); b.el.setHeight(height); + + b.el.select('iframe',true).set('width', width); + b.el.select('iframe',true).set(height); // iframe? - b.el.select('iframe',true).setSize(width,height); +// b.el.select('iframe',true).setSize(width,height); }, this); @@ -1247,7 +1252,7 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, { for (var i = 0; i