mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 16:30:37 -05:00
✨ Refresh grid cells after change static/absolute item
This commit is contained in:
parent
7b410d46ec
commit
b83c35b0dd
1 changed files with 7 additions and 2 deletions
|
@ -505,7 +505,7 @@
|
|||
(assoc :layout-item-v-sizing :fix))))
|
||||
|
||||
(defn fix-parent-sizing
|
||||
[objects ids-set changes parent]
|
||||
[parent objects ids-set changes]
|
||||
|
||||
(let [auto-width? (ctl/auto-width? parent)
|
||||
auto-height? (ctl/auto-height? parent)
|
||||
|
@ -553,7 +553,12 @@
|
|||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwc/update-shapes ids #(d/deep-merge (or % {}) changes))
|
||||
(dwc/update-shapes children-ids (partial fix-child-sizing objects changes))
|
||||
(dwc/update-shapes parent-ids (partial fix-parent-sizing objects (set ids) changes))
|
||||
(dwc/update-shapes parent-ids
|
||||
(fn [parent]
|
||||
(-> parent
|
||||
(fix-parent-sizing objects (set ids) changes)
|
||||
(cond-> (ctl/grid-layout? parent)
|
||||
(ctl/assign-cells)))))
|
||||
(ptk/data-event :layout/update ids)
|
||||
(dwu/commit-undo-transaction undo-id))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue