Browse Source

Pull request #1955: 无JIRA任务 bugfix

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '047c6384a4f95f97d4f9ad7e4f15972feaec16c8':
  bugfix
es6
guy 4 years ago
parent
commit
03295c2eaa
  1. 11
      src/core/wrapper/layout/layout.vertical.js

11
src/core/wrapper/layout/layout.vertical.js

@ -7,6 +7,7 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-v",
horizontalAlign: BI.HorizontalAlign.Stretch,
hgap: 0,
vgap: 0,
lgap: 0,
@ -47,6 +48,16 @@ BI.VerticalLayout = BI.inherit(BI.Layout, {
"margin-bottom": (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit
});
}
if (o.horizontalAlign === BI.HorizontalAlign.Center) {
w.element.css({
marginLeft: "auto",
marginRight: "auto"
});
} else if (o.horizontalAlign === BI.HorizontalAlign.Right) {
w.element.css({
marginLeft: "auto"
});
}
return w;
},

Loading…
Cancel
Save