|
|
@ -7,6 +7,8 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, { |
|
|
|
props: function () { |
|
|
|
props: function () { |
|
|
|
return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), { |
|
|
|
return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), { |
|
|
|
baseCls: "bi-abs-v-a", |
|
|
|
baseCls: "bi-abs-v-a", |
|
|
|
|
|
|
|
verticalAlign: BI.VerticalAlign.Middle, |
|
|
|
|
|
|
|
columnSize: [], |
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
|
rgap: 0, |
|
|
|
rgap: 0, |
|
|
@ -17,28 +19,26 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments); |
|
|
|
this.populate(this.options.items); |
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.htape", |
|
|
|
|
|
|
|
verticalAlign: o.verticalAlign, |
|
|
|
|
|
|
|
columnSize: o.columnSize, |
|
|
|
|
|
|
|
items: o.items, |
|
|
|
|
|
|
|
scrollx: o.scrollx, |
|
|
|
|
|
|
|
scrolly: o.scrolly, |
|
|
|
|
|
|
|
scrollable: o.scrollable, |
|
|
|
|
|
|
|
ref: function (_ref) { |
|
|
|
|
|
|
|
self.layout = _ref; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
_addElement: function (i, item) { |
|
|
|
vgap: o.vgap, |
|
|
|
var o = this.options; |
|
|
|
lgap: o.lgap, |
|
|
|
var w = BI.AbsoluteVerticalLayout.superclass._addElement.apply(this, arguments); |
|
|
|
rgap: o.rgap, |
|
|
|
w.element.css({ |
|
|
|
tgap: o.tgap, |
|
|
|
position: "absolute", |
|
|
|
bgap: o.bgap |
|
|
|
left: item.lgap / BI.pixRatio + BI.pixUnit, |
|
|
|
}; |
|
|
|
right: item.rgap / BI.pixRatio + BI.pixUnit, |
|
|
|
|
|
|
|
top: (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
|
|
|
bottom: (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
|
|
|
margin: "auto" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) { |
|
|
|
|
|
|
|
w.element.css("left", (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) { |
|
|
|
|
|
|
|
w.element.css("right", (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return w; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
resize: function () { |
|
|
@ -46,8 +46,7 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
|
BI.AbsoluteVerticalLayout.superclass.populate.apply(this, arguments); |
|
|
|
this.layout.populate.apply(this, arguments); |
|
|
|
this._mount(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout); |
|
|
|
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout); |
|
|
|