projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Roo/bootstrap/LayoutMasonry.js
[roojs1]
/
Roo
/
bootstrap
/
LayoutMasonry.js
diff --git
a/Roo/bootstrap/LayoutMasonry.js
b/Roo/bootstrap/LayoutMasonry.js
index
748e09c
..
0b082f7
100644
(file)
--- a/
Roo/bootstrap/LayoutMasonry.js
+++ b/
Roo/bootstrap/LayoutMasonry.js
@@
-149,6
+149,8
@@
Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, {
initial : function()
{
initial : function()
{
+ this.selectedBrick = [];
+
this.currentSize = this.el.getBox(true);
Roo.EventManager.onWindowResize(this.resize, this);
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.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;
},
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.setWidth(width);
b.el.setHeight(height);
+
+ b.el.select('iframe',true).first().set('width', width);
+ b.el.select('iframe',true).first().set(height);
// iframe?
// iframe?
- b.el.select('iframe',true).setSize(width,height);
+
//
b.el.select('iframe',true).setSize(width,height);
}, this);
}, this);
@@
-1247,7
+1252,7
@@
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);
for (var i = 0; i<this.bricks.length; i++) {
if (this.bricks[i].id == brick_id) {
this.bricks.splice(i,1);
- this.
getChildContainer
.removeChild(Roo.get(brick_id).dom);
+ this.
el.dom
.removeChild(Roo.get(brick_id).dom);
this.initial();
}
}
this.initial();
}
}
@@
-1262,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;
var cn = new Roo.bootstrap.MasonryBrick(cfg);
//this.register(cn);
cn.parentId = this.id;
- cn.
onRender(this.el, nul
l);
+ cn.
render(this.e
l);
return cn;
},
return cn;
},
@@
-1290,9
+1295,9
@@
Roo.extend(Roo.bootstrap.LayoutMasonry, Roo.bootstrap.Component, {
getSelected : function()
{
if (!this.selectedBrick) {
getSelected : function()
{
if (!this.selectedBrick) {
- Roo.log(this.selectedBrick)
return false;
}
return false;
}
+
return this.selectedBrick;
}
});
return this.selectedBrick;
}
});