From 9af0e6ca442a92b5c344cf9495842d757d917b72 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 27 Feb 2023 16:43:59 +0100 Subject: [PATCH] :bug: Fix problem when creating layout from selection --- .../src/app/main/data/workspace/shape_layout.cljs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/src/app/main/data/workspace/shape_layout.cljs b/frontend/src/app/main/data/workspace/shape_layout.cljs index 6e7c6df84..c708bb93a 100644 --- a/frontend/src/app/main/data/workspace/shape_layout.cljs +++ b/frontend/src/app/main/data/workspace/shape_layout.cljs @@ -183,6 +183,13 @@ (-> shape (assoc :layout-item-h-sizing :auto :layout-item-v-sizing :auto)))) + ;; Set the children to fixed to remove strange interactions + (dwc/update-shapes + selected + (fn [shape] + (-> shape + (assoc :layout-item-h-sizing :fix + :layout-item-v-sizing :fix)))) (ptk/data-event :layout/update [new-shape-id]) (dws/delete-shapes page-id selected) @@ -204,6 +211,13 @@ (merge flex-params) (assoc :layout-item-h-sizing :auto :layout-item-v-sizing :auto)))) + ;; Set the children to fixed to remove strange interactions + (dwc/update-shapes + selected + (fn [shape] + (-> shape + (assoc :layout-item-h-sizing :fix + :layout-item-v-sizing :fix)))) (ptk/data-event :layout/update [new-shape-id]) (dwu/commit-undo-transaction undo-id))))))))