guy 4 years ago
parent
commit
23aced351b
  1. 10
      src/core/wrapper/layout/flex/flex.horizontal.js
  2. 10
      src/core/wrapper/layout/flex/flex.vertical.js
  3. 10
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  4. 10
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

10
src/core/wrapper/layout/flex/flex.horizontal.js

@ -34,10 +34,12 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") { if (o.columnSize[i] !== "auto") {
w.element.addClass("fill"); if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
} else { w.element.addClass("fill");
w.element.addClass("shrink-none"); } else {
w.element.addClass("shrink-none");
}
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));

10
src/core/wrapper/layout/flex/flex.vertical.js

@ -33,10 +33,12 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") { if (o.rowSize[i] !== "auto") {
w.element.addClass("fill"); if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
} else { w.element.addClass("fill");
w.element.addClass("shrink-none"); } else {
w.element.addClass("shrink-none");
}
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));

10
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -35,10 +35,12 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") { if (o.columnSize[i] !== "auto") {
w.element.addClass("fill"); if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
} else { w.element.addClass("fill");
w.element.addClass("shrink-none"); } else {
w.element.addClass("shrink-none");
}
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));

10
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -35,10 +35,12 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") { if (o.rowSize[i] !== "auto") {
w.element.addClass("fill"); if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
} else { w.element.addClass("fill");
w.element.addClass("shrink-none"); } else {
w.element.addClass("shrink-none");
}
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));

Loading…
Cancel
Save