0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

🎉 Improve naming of components for Main components page on v1 to v2 migration

This commit is contained in:
Alejandro Alonso 2024-03-15 10:30:09 +01:00 committed by Andrés Moya
parent 3f316ca9c9
commit ca5e2c345b

View file

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