guy 4 years ago
parent
commit
4d11ab22f3
  1. 5
      src/core/wrapper/layout/adapt/adapt.horizontal.js
  2. 4
      src/core/wrapper/layout/adapt/adapt.table.js
  3. 6
      src/core/wrapper/layout/adapt/inline.vertical.js

5
src/core/wrapper/layout/adapt/adapt.horizontal.js

@ -8,7 +8,6 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-horizontal-adapt-layout",
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [],
scrollx: false,
hgap: 0,
@ -24,8 +23,8 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.horizontal",
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
horizontalAlign: BI.HorizontalAlign.Stretch,
columnSize: o.columnSize,
items: o.items,
scrollx: o.scrollx,

4
src/core/wrapper/layout/adapt/adapt.table.js

@ -25,8 +25,8 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
this.$table = BI.Widget._renderEngine.createElement("<div>").css({
position: "relative",
display: "table",
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto",
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto",
width: (o.horizontalAlign === BI.HorizontalAlign.Center || BI.HorizontalAlign.Stretch) ? "100%" : "auto",
height: (o.verticalAlign === BI.VerticalAlign.Middle || o.verticalAlign === BI.VerticalAlign.Stretch) ? "100%" : "auto",
"white-space": "nowrap"
});
this.populate(this.options.items);

6
src/core/wrapper/layout/adapt/inline.vertical.js

@ -18,7 +18,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
rgap: 0,
tgap: 0,
bgap: 0,
horizontalAlign: "left"
horizontalAlign: BI.HorizontalAlign.Left
});
},
@ -29,7 +29,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
whiteSpace: "nowrap",
textAlign: o.horizontalAlign
});
this.populate(this.options.items);
this.populate(o.items);
},
_addElement: function (i, item) {
@ -47,7 +47,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
w.element.css({
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +"px"
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {

Loading…
Cancel
Save