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.

36 lines
907 B

8 years ago
/**
* 默认的布局方式
*
* @class BI.DefaultLayout
* @extends BI.Layout
*/
BI.DefaultLayout = BI.inherit(BI.Layout, {
8 years ago
props: function () {
return BI.extend(BI.DefaultLayout.superclass.props.apply(this, arguments), {
8 years ago
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0,
items: []
});
},
8 years ago
render: function () {
BI.DefaultLayout.superclass.render.apply(this, arguments);
8 years ago
this.populate(this.options.items);
},
_addElement: function (i, item) {
var w = BI.DefaultLayout.superclass._addElement.apply(this, arguments);
4 years ago
this._handleGap(w, item);
8 years ago
return w;
},
populate: function (items) {
BI.DefaultLayout.superclass.populate.apply(this, arguments);
8 years ago
this._mount();
8 years ago
}
});
BI.shortcut("bi.default", BI.DefaultLayout);