mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 18:11:39 +02:00
🐛 Fix moving a component inside another, that is inside another, on the layers tab
This commit is contained in:
parent
7e4e10ee08
commit
4be065c957
1 changed files with 2 additions and 1 deletions
|
@ -951,12 +951,13 @@
|
||||||
parent (get objects parent-id)
|
parent (get objects parent-id)
|
||||||
component-shape (ctn/get-component-shape objects shape)
|
component-shape (ctn/get-component-shape objects shape)
|
||||||
component-shape-parent (ctn/get-component-shape objects parent)
|
component-shape-parent (ctn/get-component-shape objects parent)
|
||||||
|
root-parent (ctn/get-instance-root objects parent)
|
||||||
|
|
||||||
detach? (and (ctk/in-component-copy-not-head? shape)
|
detach? (and (ctk/in-component-copy-not-head? shape)
|
||||||
(not= (:id component-shape)
|
(not= (:id component-shape)
|
||||||
(:id component-shape-parent)))
|
(:id component-shape-parent)))
|
||||||
deroot? (and (ctk/instance-root? shape)
|
deroot? (and (ctk/instance-root? shape)
|
||||||
component-shape-parent)
|
root-parent)
|
||||||
reroot? (and (ctk/subinstance-head? shape)
|
reroot? (and (ctk/subinstance-head? shape)
|
||||||
(not component-shape-parent))
|
(not component-shape-parent))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue