Browse Source

Pull request #1880: 无JIRA任务 inline布局支持verticalAlign stretch

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

* commit '1b7064a41cc5ed35a02402aac63668aca4734774':
  布局大一统
es6
guy 4 years ago
parent
commit
3a1e084901
  1. 5
      src/core/wrapper/layout/layout.inline.js

5
src/core/wrapper/layout/layout.inline.js

@ -58,6 +58,11 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
w.element.css("max-width", "calc(100% - " + ((left + right) / BI.pixRatio + BI.pixUnit) + ")");
}
}
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + (item.bgap || 0) + (item.vgap || 0);
w.element.css("height", "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")");
}
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
w.element.css({
"margin-top": (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit

Loading…
Cancel
Save