🐛 Fix problems when moving shapes in layouts

This commit is contained in:
alonso.torres 2024-02-08 18:13:51 +01:00 committed by Andrés Moya
parent b6be1c2e1a
commit c17d2c1aba
2 changed files with 16 additions and 9 deletions

View file

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