mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 14:27:13 +02:00
🐛 Fix synchronization when adding a subcomponent to a instance
This commit is contained in:
parent
b4246c2869
commit
e9714c4fd0
4 changed files with 16 additions and 9 deletions
|
@ -664,8 +664,13 @@
|
|||
root-instance)]
|
||||
(cond-> new-shape
|
||||
true
|
||||
(assoc :shape-ref (:id original-shape)
|
||||
:frame-id (:frame-id parent-shape))
|
||||
(assoc :frame-id (:frame-id parent-shape))
|
||||
|
||||
(nil? (:shape-ref original-shape))
|
||||
(assoc :shape-ref (:id original-shape))
|
||||
|
||||
(some? (:shape-ref original-shape))
|
||||
(assoc :shape-ref (:shape-ref original-shape))
|
||||
|
||||
(:component-id original-shape)
|
||||
(assoc :component-id (:component-id original-shape))
|
||||
|
@ -685,7 +690,7 @@
|
|||
[new-shape new-shapes _]
|
||||
(cph/clone-object component-shape
|
||||
(:id parent-shape)
|
||||
(get container :objects)
|
||||
(get component :objects)
|
||||
update-new-shape
|
||||
update-original-shape)
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
(when component-file (str/format "<%s> " (:name component-file)))
|
||||
(:name component))))))))]
|
||||
|
||||
(println "[Workspace]")
|
||||
(println "[Page]")
|
||||
(show-shape (:id root) 0 objects)
|
||||
|
||||
(dorun (for [component (vals components)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue