From ca5e2c345b936320d8cda6a4022f974e12cf652f Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 15 Mar 2024 10:30:09 +0100 Subject: [PATCH] :tada: Improve naming of components for Main components page on v1 to v2 migration --- backend/src/app/features/components_v2.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index e24cbc469..46d04636f 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -1092,7 +1092,12 @@ (let [shapes (cfh/get-children-with-self (:objects component) (:id component)) - root-shape (first shapes) + ;; Let's calculate the top shame name from the components path and name + root-shape (-> (first shapes) + (assoc :name (cfh/merge-path-item (:path component) (:name component)))) + + shapes (assoc shapes 0 root-shape) + orig-pos (gpt/point (:x root-shape) (:y root-shape)) delta (gpt/subtract position orig-pos)