From 4ece2ba14890c7e0736350234e19375c838e9ce3 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 13 Feb 2024 12:22:05 +0100 Subject: [PATCH] :bug: Fix problem with calculated margins in flex layout --- common/src/app/common/geom/shapes/flex_layout/params.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/geom/shapes/flex_layout/params.cljc b/common/src/app/common/geom/shapes/flex_layout/params.cljc index 7bd1ce855f..b1e15c70bd 100644 --- a/common/src/app/common/geom/shapes/flex_layout/params.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/params.cljc @@ -88,8 +88,8 @@ parent-selrect (:selrect parent) padding (when (and (not (nil? parent)) (> (count shapes) 0)) - {:p1 (min (- min-y (:y1 parent-selrect)) (- (:y2 parent-selrect) max-y)) - :p2 (min (- min-x (:x1 parent-selrect)) (- (:x2 parent-selrect) max-x))})] + {:p1 (- min-y (:y1 parent-selrect)) + :p2 (- min-x (:x1 parent-selrect))})] (cond-> {:layout-flex-dir direction :layout-gap layout-gap} (not (nil? padding))