0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

🐛 Fix broken layout and layout-gap props on migrating to comp-v2

This commit is contained in:
Andrey Antukh 2024-01-17 17:25:43 +01:00
parent 3d84270f50
commit ba3c42e62c

View file

@ -129,7 +129,16 @@
(if (or (= gap ##Inf)
(= gap ##-Inf))
0
gap)))))
gap)))
;; Fix some broken layout related attrs, probably
;; of copypaste on flex layout betatest period
(true? (:layout shape))
(assoc :layout :flex)
(number? (:layout-gap shape))
(as-> shape (let [n (:layout-gap shape)]
(assoc shape :layout-gap {:row-gap n :column-gap n})))))
update-container
(fn [container]