try and get ctrl-enter to add a clear all
[roojs1] / Roo / bootstrap / LayoutMasonry.js
index 895a77d..b3a5ee6 100644 (file)
@@ -1,4 +1,10 @@
+
+
 /**
+ * @class Roo.bootstrap.LayoutMasonry
+ * @extends Roo.bootstrap.Component
+ * @children Roo.bootstrap.Element Roo.bootstrap.Img Roo.bootstrap.MasonryBrick
+ * Bootstrap Layout Masonry class
  *
  * This is based on 
  * http://masonry.desandro.com
@@ -6,15 +12,7 @@
  * The idea is to render all the bricks based on vertical width...
  *
  * The original code extends 'outlayer' - we might need to use that....
- * 
- */
 
-
-/**
- * @class Roo.bootstrap.LayoutMasonry
- * @extends Roo.bootstrap.Component
- * Bootstrap Layout Masonry class
- * 
  * @constructor
  * Create a new Element
  * @param {Object} config The config object
@@ -249,22 +247,14 @@ 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);
         
     },
@@ -1257,7 +1247,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();
             }
@@ -1273,7 +1262,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;
     },