0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

🐛 Fix problem with layout reflow

This commit is contained in:
alonso.torres 2024-11-15 15:12:52 +01:00
parent 0e99b37c21
commit 2ed743b6be

View file

@ -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