mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 10:56:12 +02:00
🐛 Fix problems when moving shapes in layouts
This commit is contained in:
parent
b6be1c2e1a
commit
c17d2c1aba
2 changed files with 16 additions and 9 deletions
|
@ -511,7 +511,11 @@
|
|||
objects (wsh/lookup-page-objects state page-id)
|
||||
selected (wsh/lookup-selected state {:omit-blocked? true})
|
||||
ids (if (nil? ids) selected ids)
|
||||
shapes (mapv #(get objects %) ids)
|
||||
shapes (into []
|
||||
(comp (map (d/getf objects))
|
||||
(remove ctk/in-component-copy-not-head?))
|
||||
ids)
|
||||
|
||||
duplicate-move-started? (get-in state [:workspace-local :duplicate-move-started?] false)
|
||||
|
||||
stopper (->> stream
|
||||
|
@ -670,6 +674,7 @@
|
|||
|
||||
{:keys [layout-grid-cells]}
|
||||
(->> children
|
||||
(remove #(ctk/in-component-copy-not-head? (get objects %)))
|
||||
(keep #(ctl/get-cell-by-shape-id parent %))
|
||||
(sort-by key-prop key-comp)
|
||||
(reduce (fn [parent {:keys [id row column row-span column-span]}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue