0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 07:11:32 -05:00

🐛 Fix problem with flex propagation

This commit is contained in:
alonso.torres 2024-02-05 13:00:02 +01:00 committed by Andrey Antukh
parent a64854bf72
commit b8b40fc7ef

View file

@ -92,5 +92,11 @@
(defn resolve-subtree
"Resolves the subtree but only partialy from-to the parameters"
[from-id to-id objects]
(->> (get-children-seq from-id objects)
(d/take-until #(= (:id %) to-id))))
(concat
(->> (get-children-seq from-id objects)
(d/take-until #(= (:id %) to-id)))
;; Add the children of `to-id` to the subtree. Rest is to remove the
;; to-id element that is already on the previous sequence
(->> (get-children-seq to-id objects)
rest)))