From 4d46460f9051617fd965a56fb209d4d95a69cf1e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 24 Feb 2023 14:26:33 +0100 Subject: [PATCH] :bug: Fix problem when moving absolute positioned element --- frontend/src/app/main/data/workspace/transforms.cljs | 4 +++- .../main/ui/workspace/sidebar/options/menus/layout_item.cljs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index 72b05c104..daaf0f0ad 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -643,7 +643,9 @@ (let [objects (wsh/lookup-page-objects state) selected (wsh/lookup-selected state {:omit-blocked? true}) selected-shapes (->> selected (map (d/getf objects)))] - (if (every? (partial ctl/layout-immediate-child? objects) selected-shapes) + (if (every? #(and (ctl/layout-immediate-child? objects %) + (not (ctl/layout-absolute? %))) + selected-shapes) (rx/of (reorder-selected-layout-child direction)) (rx/of (nudge-selected-shapes direction shift?))))))) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs index c99acb8b3..25bf1c809 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/layout_item.cljs @@ -206,7 +206,7 @@ [:div.element-set [:div.element-set-title - [:span (if is-layout-container? + [:span (if (and is-layout-container? (not is-layout-child?)) "Flex board" "Flex element")]]