mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 17:05:53 +02:00
🎉 Improve naming of components for Main components page on v1 to v2 migration
This commit is contained in:
parent
3f316ca9c9
commit
ca5e2c345b
1 changed files with 6 additions and 1 deletions
|
@ -1092,7 +1092,12 @@
|
||||||
(let [shapes (cfh/get-children-with-self (:objects component)
|
(let [shapes (cfh/get-children-with-self (:objects component)
|
||||||
(:id 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))
|
orig-pos (gpt/point (:x root-shape) (:y root-shape))
|
||||||
delta (gpt/subtract position orig-pos)
|
delta (gpt/subtract position orig-pos)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue