0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

🐛 Fix problem with grid layout ordering after moving

This commit is contained in:
alonso.torres 2024-11-11 12:34:07 +01:00
parent 7823eaf890
commit c3970255e6
2 changed files with 9 additions and 7 deletions

View file

@ -5,6 +5,7 @@
### :bug: Bugs fixed
- Fix null pointer exception on number checking functions
- Fix problem with grid layout ordering after moving [Taiga #9179](https://tree.taiga.io/project/penpot/issue/9179)
### :books: Documentation

View file

@ -391,13 +391,14 @@
(-> (pcb/update-shapes
[parent-id]
(fn [frame objects]
(-> frame
;; Assign the cell when pushing into a specific grid cell
(cond-> (some? cell)
(-> (ctl/free-cell-shapes ids)
(ctl/push-into-cell ids (:row cell) (:column cell))
(ctl/assign-cells objects)))
(ctl/assign-cell-positions objects)))
(let [[row column] cell]
(-> frame
;; Assign the cell when pushing into a specific grid cell
(cond-> (some? cell)
(-> (ctl/free-cell-shapes ids)
(ctl/push-into-cell ids row column)
(ctl/assign-cells objects)))
(ctl/assign-cell-positions objects))))
{:with-objects? true})
(pcb/reorder-grid-children [parent-id])))