fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

8 years ago
/**
*自适应水平和垂直方向都居中容器
* Created by GUY on 2016/12/2.
*
* @class BI.FlexVerticalCenter
* @extends BI.Layout
*/
BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
8 years ago
props: function () {
return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), {
4 years ago
baseCls: "bi-f-v-c",
8 years ago
horizontalAlign: BI.HorizontalAlign.Left,
8 years ago
columnSize: [],
6 years ago
scrollx: false,
8 years ago
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
8 years ago
render: function () {
6 years ago
var self = this, o = this.options;
return {
type: "bi.flex_horizontal",
ref: function (_ref) {
self.wrapper = _ref;
},
verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: o.horizontalAlign,
columnSize: o.columnSize,
4 years ago
rowSize: o.rowSize,
6 years ago
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
vgap: o.vgap,
6 years ago
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap,
6 years ago
items: o.items
};
8 years ago
},
resize: function () {
6 years ago
// console.log("flex_vertical_center_adapt布局不需要resize");
8 years ago
},
6 years ago
update: function (opt) {
return this.wrapper.update(opt);
},
8 years ago
populate: function (items) {
6 years ago
this.wrapper.populate(items);
8 years ago
}
});
6 years ago
BI.shortcut("bi.flex_vertical_adapt", BI.FlexVerticalCenter);
4 years ago
BI.shortcut("bi.flex_vertical_center_adapt", BI.FlexVerticalCenter);