diff --git a/src/core/wrapper/layout/flex/flex.center.js b/src/core/wrapper/layout/flex/flex.center.js index 99859c75d..6f2856201 100644 --- a/src/core/wrapper/layout/flex/flex.center.js +++ b/src/core/wrapper/layout/flex/flex.center.js @@ -28,6 +28,8 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, { }, horizontalAlign: o.horizontalAlign, verticalAlign: o.verticalAlign, + columnSize: o.columnSize, + rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, scrollable: o.scrollable, diff --git a/src/core/wrapper/layout/flex/flex.horizontal.center.js b/src/core/wrapper/layout/flex/flex.horizontal.center.js index 6639e46de..a58c5e6a6 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.center.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.center.js @@ -28,6 +28,7 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, { }, horizontalAlign: BI.HorizontalAlign.Center, verticalAlign: o.verticalAlign, + columnSize: o.columnSize, rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, @@ -53,4 +54,4 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, { } }); BI.shortcut("bi.flex_horizontal_adapt", BI.FlexHorizontalCenter); -BI.shortcut("bi.flex_horizontal_center_adapt", BI.FlexHorizontalCenter); \ No newline at end of file +BI.shortcut("bi.flex_horizontal_center_adapt", BI.FlexHorizontalCenter); diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 22cd106af..7d2045060 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -35,15 +35,13 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { position: "relative" }); if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { - w.element.css({ - "flex-shrink": "0" - }); + w.element.addClass("shrink-none"); } if (o.columnSize[i] > 0) { w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); } if (o.columnSize[i] === "fill") { - w.element.css("flex", "1"); + w.element.addClass("fill"); } if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { w.element.css({ diff --git a/src/core/wrapper/layout/flex/flex.vertical.center.js b/src/core/wrapper/layout/flex/flex.vertical.center.js index a87ad2da7..b037f0162 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.center.js +++ b/src/core/wrapper/layout/flex/flex.vertical.center.js @@ -30,6 +30,7 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, { verticalAlign: BI.VerticalAlign.Middle, horizontalAlign: o.horizontalAlign, columnSize: o.columnSize, + rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, scrollable: o.scrollable, @@ -54,4 +55,4 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, { } }); BI.shortcut("bi.flex_vertical_adapt", BI.FlexVerticalCenter); -BI.shortcut("bi.flex_vertical_center_adapt", BI.FlexVerticalCenter); \ No newline at end of file +BI.shortcut("bi.flex_vertical_center_adapt", BI.FlexVerticalCenter); diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 8de8e6d31..34acdb4c3 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -34,15 +34,13 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { position: "relative" }); if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { - w.element.css({ - "flex-shrink": "0" - }); + w.element.addClass("shrink-none"); } if (o.rowSize[i] > 0) { w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); } if (o.rowSize[i] === "fill") { - w.element.css("flex", "1"); + w.element.addClass("fill"); } if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { w.element.css({ diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js index bbe7d79c0..44d0b78eb 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js @@ -31,6 +31,8 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, { }, horizontalAlign: o.horizontalAlign, verticalAlign: o.verticalAlign, + columnSize: o.columnSize, + rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, scrollable: o.scrollable, diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js index 0f54ab6cf..dded39a4f 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js @@ -30,6 +30,7 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, { }, horizontalAlign: BI.HorizontalAlign.Center, verticalAlign: o.verticalAlign, + columnSize: o.columnSize, rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, @@ -51,4 +52,4 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, { } }); BI.shortcut("bi.flex_scrollable_horizontal_adapt", BI.FlexWrapperHorizontalCenter); -BI.shortcut("bi.flex_scrollable_horizontal_center_adapt", BI.FlexWrapperHorizontalCenter); \ No newline at end of file +BI.shortcut("bi.flex_scrollable_horizontal_center_adapt", BI.FlexWrapperHorizontalCenter); diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js index ce695e8c3..1a3e62bb6 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -36,15 +36,13 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { position: "relative" }); if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { - w.element.css({ - "flex-shrink": "0" - }); + w.element.addClass("shrink-none"); } if (o.columnSize[i] > 0) { w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); } if (o.columnSize[i] === "fill") { - w.element.css("flex", "1"); + w.element.addClass("fill"); } if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { w.element.css({ diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js index b572b3088..ebc840696 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js @@ -31,6 +31,7 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, { verticalAlign: BI.VerticalAlign.Middle, horizontalAlign: o.horizontalAlign, columnSize: o.columnSize, + rowSize: o.rowSize, scrollx: o.scrollx, scrolly: o.scrolly, scrollable: o.scrollable, @@ -51,4 +52,4 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, { } }); BI.shortcut("bi.flex_scrollable_vertical_adapt", BI.FlexWrapperVerticalCenter); -BI.shortcut("bi.flex_scrollable_vertical_center_adapt", BI.FlexWrapperVerticalCenter); \ No newline at end of file +BI.shortcut("bi.flex_scrollable_vertical_center_adapt", BI.FlexWrapperVerticalCenter); diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js index 0c373fa19..0af54996c 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -36,15 +36,13 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { position: "relative" }); if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { - w.element.css({ - "flex-shrink": "0" - }); + w.element.addClass("shrink-none"); } if (o.rowSize[i] > 0) { w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); } if (o.rowSize[i] === "fill") { - w.element.css("flex", "1"); + w.element.addClass("fill"); } if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { w.element.css({ diff --git a/src/less/core/wrapper/flex.horizontal.less b/src/less/core/wrapper/flex.horizontal.less index 565cd3bb7..86e986f3e 100644 --- a/src/less/core/wrapper/flex.horizontal.less +++ b/src/less/core/wrapper/flex.horizontal.less @@ -156,4 +156,19 @@ justify-content: flex-end; } } + + > .shrink-none { + -webkit-flex-shrink: 0; + -moz-flex-shrink: 0; + -ms-flex-shrink: 0; + flex-shrink: 0; + } + + > .fill { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + } } diff --git a/src/less/core/wrapper/flex.vertical.less b/src/less/core/wrapper/flex.vertical.less index d324e2fa5..a5a89dc1a 100644 --- a/src/less/core/wrapper/flex.vertical.less +++ b/src/less/core/wrapper/flex.vertical.less @@ -155,4 +155,19 @@ justify-content: flex-end; } } + + > .shrink-none { + -webkit-flex-shrink: 0; + -moz-flex-shrink: 0; + -ms-flex-shrink: 0; + flex-shrink: 0; + } + + > .fill { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + } } diff --git a/src/less/core/wrapper/flex.wrapper.horizontal.less b/src/less/core/wrapper/flex.wrapper.horizontal.less index 607275b4c..20d00b6e7 100644 --- a/src/less/core/wrapper/flex.wrapper.horizontal.less +++ b/src/less/core/wrapper/flex.wrapper.horizontal.less @@ -163,5 +163,20 @@ justify-content: flex-end; } } + + > .shrink-none { + -webkit-flex-shrink: 0; + -moz-flex-shrink: 0; + -ms-flex-shrink: 0; + flex-shrink: 0; + } + + > .fill { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + } } } diff --git a/src/less/core/wrapper/flex.wrapper.vertical.less b/src/less/core/wrapper/flex.wrapper.vertical.less index 5806e8108..569dbfccd 100644 --- a/src/less/core/wrapper/flex.wrapper.vertical.less +++ b/src/less/core/wrapper/flex.wrapper.vertical.less @@ -163,5 +163,20 @@ justify-content: flex-end; } } + + > .shrink-none { + -webkit-flex-shrink: 0; + -moz-flex-shrink: 0; + -ms-flex-shrink: 0; + flex-shrink: 0; + } + + > .fill { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + } } }