From b83c35b0ddd2702868f53639ceb308621ed49fe0 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 24 May 2023 14:13:18 +0200 Subject: [PATCH] :sparkles: Refresh grid cells after change static/absolute item --- frontend/src/app/main/data/workspace/shape_layout.cljs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/workspace/shape_layout.cljs b/frontend/src/app/main/data/workspace/shape_layout.cljs index 4e8c5e75d..777d9552d 100644 --- a/frontend/src/app/main/data/workspace/shape_layout.cljs +++ b/frontend/src/app/main/data/workspace/shape_layout.cljs @@ -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))))))