From 2ed743b6be2a6b32ee96af0ad0493f8e772d7163 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 15 Nov 2024 15:12:52 +0100 Subject: [PATCH] :bug: Fix problem with layout reflow --- common/src/app/common/types/modifiers.cljc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/common/src/app/common/types/modifiers.cljc b/common/src/app/common/types/modifiers.cljc index d0669a024b..7ddbd20150 100644 --- a/common/src/app/common/types/modifiers.cljc +++ b/common/src/app/common/types/modifiers.cljc @@ -529,13 +529,6 @@ (or (d/not-empty? (dm/get-prop modifiers :geometry-child)) (d/not-empty? (dm/get-prop modifiers :structure-child)))) -(defn only-move? - "Returns true if there are only move operations" - [modifiers] - (let [move-op? #(= :move (dm/get-prop % :type))] - (and (every? move-op? (dm/get-prop modifiers :geometry-child)) - (every? move-op? (dm/get-prop modifiers :geometry-parent))))) - (defn has-geometry? [modifiers] (or (d/not-empty? (dm/get-prop modifiers :geometry-parent)) @@ -550,6 +543,14 @@ [modifiers] (d/not-empty? (dm/get-prop modifiers :structure-child))) +(defn only-move? + "Returns true if there are only move operations" + [modifiers] + (let [move-op? #(= :move (dm/get-prop % :type))] + (and (not (has-structure? modifiers)) + (every? move-op? (dm/get-prop modifiers :geometry-child)) + (every? move-op? (dm/get-prop modifiers :geometry-parent))))) + ;; Extract subsets of modifiers (defn select-child