🐛 Fix problem when creating a component instance from grid layout

This commit is contained in:
alonso.torres 2024-09-05 14:41:09 +02:00
parent caf78a6b4d
commit b15b394c65
2 changed files with 8 additions and 3 deletions

View file

@ -1622,13 +1622,17 @@
(defn remap-grid-cells
"Remaps the shapes ids inside the cells"
[shape ids-map]
(let [do-remap-cells
(let [remap-shape
(fn [id]
(get ids-map id id))
remap-cell
(fn [cell]
(-> cell
(update :shapes #(into [] (keep ids-map) %))))
(update :shapes #(into [] (keep remap-shape) %))))
shape
(-> shape
(update :layout-grid-cells update-vals do-remap-cells))]
(update :layout-grid-cells update-vals remap-cell))]
shape))
(defn merge-cells