mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -05:00
🐛 Fix problem with flex direction
This commit is contained in:
parent
baf9124304
commit
2a46989ec9
3 changed files with 4 additions and 4 deletions
|
@ -141,7 +141,7 @@
|
|||
[frame layout-data children]
|
||||
|
||||
(let [reverse? (:reverse? layout-data)
|
||||
children (vec (cond->> (d/enumerate children) reverse? reverse))
|
||||
children (vec (cond->> (d/enumerate children) (not reverse?) reverse))
|
||||
lines (:layout-lines layout-data)]
|
||||
|
||||
(loop [areas []
|
||||
|
@ -169,7 +169,7 @@
|
|||
areas
|
||||
|
||||
(let [[child-area child-area-start child-area-end]
|
||||
(drop-child-areas frame line-area child index reverse? prev-child-x prev-child-y (nil? (first children)))]
|
||||
(drop-child-areas frame line-area child index (not reverse?) prev-child-x prev-child-y (nil? (first children)))]
|
||||
(recur (conj areas child-area-start child-area-end)
|
||||
(+ (:x child-area) (:width child-area))
|
||||
(+ (:y child-area) (:height child-area))
|
||||
|
|
|
@ -304,7 +304,7 @@
|
|||
|
||||
(let [layout-bounds (layout-bounds shape)
|
||||
reverse? (ctl/reverse? shape)
|
||||
children (cond->> children reverse? reverse)
|
||||
children (cond->> children (not reverse?) reverse)
|
||||
|
||||
;; Creates the layout lines information
|
||||
layout-lines
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
(let [children (map (d/getf objects) (:shapes parent))
|
||||
children (->> children (map (partial apply-modifiers modif-tree)))
|
||||
layout-data (gcl/calc-layout-data parent children)
|
||||
children (into [] (cond-> children (:reverse? layout-data) reverse))
|
||||
children (into [] (cond-> children (not (:reverse? layout-data)) reverse))
|
||||
max-idx (dec (count children))
|
||||
layout-lines (:layout-lines layout-data)]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue