From b8b40fc7efb507acc2b8438ffd9dc79723b12d9a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 5 Feb 2024 13:00:02 +0100 Subject: [PATCH] :bug: Fix problem with flex propagation --- common/src/app/common/geom/shapes/tree_seq.cljc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/geom/shapes/tree_seq.cljc b/common/src/app/common/geom/shapes/tree_seq.cljc index b846a21296..8ed6b61b8d 100644 --- a/common/src/app/common/geom/shapes/tree_seq.cljc +++ b/common/src/app/common/geom/shapes/tree_seq.cljc @@ -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)))