From afa9f5b3f3fa3ac8942641ceaa44cf1374b29ada Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 18 Feb 2021 16:19:35 +0800 Subject: [PATCH] update --- src/core/wrapper/layout/flex/flex.horizontal.js | 2 +- src/core/wrapper/layout/flex/flex.vertical.js | 2 +- src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js | 2 +- src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index e1798205c..307f10e6e 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -34,7 +34,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (BI.contains([BI.HorizontalAlign.Left, BI.HorizontalAlign.Right], o.horizontalAlign)) { + if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { w.element.css({ "flex-shrink": "0" }); diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 8660ff3fd..5170f9cf1 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -33,7 +33,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign === BI.VerticalAlign.Top || o.verticalAlign === BI.VerticalAlign.Bottom) { + if (o.verticalAlign !== BI.VerticalAlign.Stretch) { w.element.css({ "flex-shrink": "0" }); 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 738362626..c722999ed 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -35,7 +35,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.horizontalAlign === BI.HorizontalAlign.Left || o.horizontalAlign === BI.HorizontalAlign.Right) { + if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) { w.element.css({ "flex-shrink": "0" }); 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 2809f38f1..cd3c3d887 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -35,7 +35,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign === BI.VerticalAlign.Top || o.verticalAlign === BI.VerticalAlign.Bottom) { + if (o.verticalAlign !== BI.VerticalAlign.Stretch) { w.element.css({ "flex-shrink": "0" });