mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🐛 Use helper to normalice behavior of component display in dump_tree
This commit is contained in:
parent
3228d0a95f
commit
51ab11e91e
1 changed files with 5 additions and 9 deletions
|
@ -645,17 +645,13 @@
|
|||
(str " #" (when show-ids (str/format " [Component %s]" (:component-id shape))))
|
||||
"")
|
||||
(let [root-shape (ctn/get-component-shape objects shape)
|
||||
component-id (when root-shape (:component-id root-shape))
|
||||
component-file-id (when root-shape (:component-file root-shape))
|
||||
component-file (when component-file-id (get libraries component-file-id nil))
|
||||
component (when component-id
|
||||
(if component-file
|
||||
(ctkl/get-component (:data component-file) component-id true)
|
||||
(ctkl/get-component (:data file) component-id true)))
|
||||
component-shape (when component
|
||||
(if component-file
|
||||
(get-ref-shape (:data component-file) component shape)
|
||||
(get-ref-shape (:data file) component shape)))]
|
||||
component-shape (find-ref-shape file
|
||||
{:objects objects}
|
||||
libraries
|
||||
shape
|
||||
:include-deleted? true)]
|
||||
|
||||
(str/format " %s--> %s%s%s%s%s"
|
||||
(cond (:component-root shape) "#"
|
||||
|
|
Loading…
Add table
Reference in a new issue