Roo/bootstrap/LayoutMasonry.js
[roojs1] / Roo / bootstrap / LayoutMasonry.js
index 7c68c77..45c0a24 100644 (file)
@@ -249,29 +249,20 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
     {
         this.getContainerWidth();
         
-        Roo.log('this.containerWidth : ' + this.containerWidth);
-        
         var boxWidth = this.boxWidth;
         
-        Roo.log('this.boxWidth : ' + this.boxWidth);
-        
         if(this.containerWidth < boxWidth){
             boxWidth = this.containerWidth;
         }
         
-        Roo.log('boxWidth : ' + boxWidth);
-        
         this.unitWidth = Math.floor((boxWidth - (this.gutter * 2)) / 3);
         
-        Roo.log('this.unitWidth : ' + this.unitWidth);
-        
         this.el.setHeight(boxWidth);
         
     },
     
     getContainerWidth : function()
     {
-        Roo.log(this.el.getBox(true));
         this.containerWidth = this.el.getBox(true).width;  //maybe use getComputedWidth
     },
     
@@ -672,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);
             
@@ -1258,7 +1252,6 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
         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();
             }
@@ -1274,7 +1267,7 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
         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;
     },