From 28dce3cc8bd85b966e60b171369432d60144ae2b Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 21 Feb 2023 15:44:13 +0100 Subject: [PATCH] :bug: Fix problem with align center and width 100% --- common/src/app/common/geom/shapes/flex_layout/bounds.cljc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/geom/shapes/flex_layout/bounds.cljc b/common/src/app/common/geom/shapes/flex_layout/bounds.cljc index 6c65c78274..d37dc32f32 100644 --- a/common/src/app/common/geom/shapes/flex_layout/bounds.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/bounds.cljc @@ -78,16 +78,18 @@ (conj (gpt/add base-p (hv min-width))) (and col? h-center?) - (conj (gpt/add base-p (hv (/ min-width 2)))) + (conj (gpt/add base-p (hv (/ min-width 2))) + (gpt/subtract base-p (hv (/ min-width 2)))) - (and col? h-center?) + (and col? h-end?) (conj (gpt/subtract base-p (hv min-width))) (and row? v-start?) (conj (gpt/add base-p (vv min-height))) (and row? v-center?) - (conj (gpt/add base-p (vv (/ min-height 2)))) + (conj (gpt/add base-p (vv (/ min-height 2))) + (gpt/subtract base-p (vv (/ min-height 2)))) (and row? v-end?) (conj (gpt/subtract base-p (vv min-height))))))