0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-28 15:41:25 -05:00

🐛 Fix problem with calculated margins in flex layout

This commit is contained in:
alonso.torres 2024-02-13 12:22:05 +01:00 committed by Andrey Antukh
parent 2bb2d4ca59
commit 4ece2ba148

View file

@ -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))