🐛 Fix synchronization when adding a subcomponent to a instance

This commit is contained in:
Andrés Moya 2020-12-03 14:18:03 +01:00 committed by Andrey Antukh
parent b4246c2869
commit e9714c4fd0
4 changed files with 16 additions and 9 deletions

View file

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

View file

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