Roo/bootstrap/LayoutMasonry.js
[roojs1] / Roo / bootstrap / LayoutMasonry.js
index fe4fe60..acefd7a 100644 (file)
@@ -152,7 +152,8 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
         this.selectedBrick = [];
         
         this.currentSize = this.el.getBox(true);
-        
+        Roo.log(this.currentSize);
+        alert(this.currentSize);
         Roo.EventManager.onWindowResize(this.resize, this); 
 
         if(!this.isAutoInitial){
@@ -257,8 +258,6 @@ Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component,  {
         
         this.unitWidth = Math.floor((boxWidth - (this.gutter * 2)) / 3);
         
-        Roo.log(boxWidth);
-        
         this.el.setHeight(boxWidth);
         
     },
@@ -1251,7 +1250,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();
             }
@@ -1267,7 +1265,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;
     },