mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 11:38:21 +02:00
🐛 Fix create a main component inside another and move one main inside another
This commit is contained in:
parent
cee827a97b
commit
23527b1d19
4 changed files with 22 additions and 17 deletions
|
@ -840,6 +840,9 @@
|
|||
;; Remove layout-item properties when moving a shape outside a layout
|
||||
(cond-> (not (ctl/any-layout? objects frame-id))
|
||||
(pcb/update-shapes moving-shapes-ids ctl/remove-layout-item-data))
|
||||
;; Remove componnet-root property when moving a shape inside a component
|
||||
(cond-> (ctn/get-instance-root objects frame)
|
||||
(pcb/update-shapes moving-shapes-ids #(dissoc % :component-root)))
|
||||
(pcb/update-shapes moving-shapes-ids #(cond-> % (cfh/frame-shape? %) (assoc :hide-in-viewer true)))
|
||||
(pcb/update-shapes shape-ids-to-detach ctk/detach-shape)
|
||||
(pcb/change-parent frame-id moving-shapes drop-index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue