mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
Merge pull request #5320 from penpot/alotor-fix-problem-layouts
🐛 Fix problem with layout reflow
This commit is contained in:
commit
4466abd150
1 changed files with 8 additions and 7 deletions
|
@ -529,13 +529,6 @@
|
||||||
(or (d/not-empty? (dm/get-prop modifiers :geometry-child))
|
(or (d/not-empty? (dm/get-prop modifiers :geometry-child))
|
||||||
(d/not-empty? (dm/get-prop modifiers :structure-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?
|
(defn has-geometry?
|
||||||
[modifiers]
|
[modifiers]
|
||||||
(or (d/not-empty? (dm/get-prop modifiers :geometry-parent))
|
(or (d/not-empty? (dm/get-prop modifiers :geometry-parent))
|
||||||
|
@ -550,6 +543,14 @@
|
||||||
[modifiers]
|
[modifiers]
|
||||||
(d/not-empty? (dm/get-prop modifiers :structure-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 (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
|
;; Extract subsets of modifiers
|
||||||
|
|
||||||
(defn select-child
|
(defn select-child
|
||||||
|
|
Loading…
Add table
Reference in a new issue