Roo/bootstrap/MasonryBrick.js
authoredward <edward@roojs.com>
Mon, 8 May 2017 07:05:09 +0000 (15:05 +0800)
committeredward <edward@roojs.com>
Mon, 8 May 2017 07:05:09 +0000 (15:05 +0800)
Roo/bootstrap/MasonryBrick.js

index a49c6a8..922e284 100644 (file)
@@ -78,12 +78,25 @@ Roo.extend(Roo.bootstrap.MasonryBrick, Roo.bootstrap.Component,  {
             cls += ' masonry-' + this.size + '-brick';
         }
         
-        if(!this.html.length && !this.bgimage.length){
-            cls += ' masonry-center-title';
-        }
-        
-        if(!this.html.length && this.bgimage.length){
-            cls += ' masonry-bottom-title';
+        if(!this.placetitle.length){
+            switch (this.placetitle) {
+                case 'center' :
+                    cls += ' masonry-center-title';
+                    break;
+                case 'bottom' :
+                    cls += ' masonry-bottom-title';
+                    break;
+                default:
+                    break;
+            }
+        } else {
+            if(!this.html.length && !this.bgimage.length){
+                cls += ' masonry-center-title';
+            }
+
+            if(!this.html.length && this.bgimage.length){
+                cls += ' masonry-bottom-title';
+            }
         }
         
         if(this.cls){