mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 13:18:21 +02:00
🐛 Fix problem when creating a component instance from grid layout
This commit is contained in:
parent
caf78a6b4d
commit
b15b394c65
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue