diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 557aecfe84..2b313f6995 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -40,12 +40,15 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.columnSize[i] !== "auto") { - if (!(o.horizontalAlign === BI.HorizontalAlign.Stretch && (o.columnSize[i] === "fill" || o.columnSize[i] === ""))) { - w.element.addClass("f-s-n"); + if (o.columnSize[i] === "fill" || o.columnSize[i] === "") { + if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { + if (o.scrollable === true || o.scrollx === true) { + w.element.addClass("f-s-n"); + } } } if (o.columnSize[i] > 0) { + w.element.addClass("f-s-n"); w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit))); } if (o.columnSize[i] === "fill") { diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 52f66df438..836b9c0cf0 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -39,12 +39,15 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.rowSize[i] !== "auto") { - if (!(o.verticalAlign === BI.VerticalAlign.Stretch && (o.rowSize[i] === "fill" || o.rowSize[i] === ""))) { - w.element.addClass("f-s-n"); + if (o.rowSize[i] === "fill" || o.rowSize[i] === "") { + if (o.verticalAlign !== BI.VerticalAlign.Stretch) { + if (o.scrollable === true || o.scrolly === true) { + w.element.addClass("f-s-n"); + } } } if (o.rowSize[i] > 0) { + w.element.addClass("f-s-n"); w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit))); } if (o.rowSize[i] === "fill") { 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 e9ec1c3e38..1d98c584ca 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -36,12 +36,15 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.columnSize[i] !== "auto") { - if (!(o.horizontalAlign === BI.HorizontalAlign.Stretch && (o.columnSize[i] === "fill" || o.columnSize[i] === ""))) { - w.element.addClass("f-s-n"); + if (o.columnSize[i] === "fill" || o.columnSize[i] === "") { + if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { + if (o.scrollable === true || o.scrollx === true) { + w.element.addClass("f-s-n"); + } } } if (o.columnSize[i] > 0) { + w.element.addClass("f-s-n"); w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit))); } if (o.columnSize[i] === "fill") { 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 7f7ce5784a..0ee6d00e46 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -36,12 +36,15 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.rowSize[i] !== "auto") { - if (!(o.verticalAlign === BI.VerticalAlign.Stretch && (o.rowSize[i] === "fill" && o.rowSize[i] === ""))) { - w.element.addClass("f-s-n"); + if (o.rowSize[i] === "fill" || o.rowSize[i] === "") { + if (o.verticalAlign !== BI.VerticalAlign.Stretch) { + if (o.scrollable === true || o.scrolly === true) { + w.element.addClass("f-s-n"); + } } } if (o.rowSize[i] > 0) { + w.element.addClass("f-s-n"); w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit))); } if (o.rowSize[i] === "fill") {