Browse Source

布局大一统

es6
guy 4 years ago
parent
commit
1b7064a41c
  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