|
|
|
@ -8,7 +8,9 @@
|
|
|
|
|
BI.FlexCenterLayout = BI.inherit(BI.Layout, { |
|
|
|
|
props: function () { |
|
|
|
|
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-flex-center-adapt-layout" |
|
|
|
|
baseCls: "bi-flex-center-adapt-layout", |
|
|
|
|
hgap: 0, |
|
|
|
|
vgap: 0 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
render: function () { |
|
|
|
@ -19,7 +21,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
_addElement: function (i, item) { |
|
|
|
|
var o = this.options; |
|
|
|
|
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); |
|
|
|
|
w.element.css({position: "relative", "flex-shrink": "0"}); |
|
|
|
|
w.element.css({ |
|
|
|
|
position: "relative", |
|
|
|
|
"flex-shrink": "0", |
|
|
|
|
"margin-left": (i === 0 ? o.hgap : 0) + "px", |
|
|
|
|
"margin-right": o.hgap + "px", |
|
|
|
|
"margin-top": o.vgap + "px", |
|
|
|
|
"margin-bottom": o.vgap + "px" |
|
|
|
|
}); |
|
|
|
|
return w; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|