From f3c5aed5d031018ec6ee08f8db751b2abc4f80cb Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 13 Feb 2023 16:47:28 +0100 Subject: [PATCH] :bug: Fix problem with align center and size auto --- common/src/app/common/geom/shapes/flex_layout/bounds.cljc | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 9cce53ed4..968ed4d88 100644 --- a/common/src/app/common/geom/shapes/flex_layout/bounds.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/bounds.cljc @@ -78,7 +78,8 @@ (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?) (conj (gpt/subtract base-p (hv min-width))) @@ -87,7 +88,8 @@ (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))))))