Position absolute in grid layout

This commit is contained in:
alonso.torres 2023-05-17 13:45:14 +02:00
parent 117a8d09d3
commit c9b932f954
4 changed files with 8 additions and 5 deletions

View file

@ -329,6 +329,7 @@
(->> (:shapes cell) (map #(vector % cell)))))
(:layout-grid-cells parent))
children (->> children (remove #(ctl/layout-absolute? (second %))))
children-map
(into {}
(map #(vector (:id (second %)) %))

View file

@ -154,9 +154,10 @@
(gpt/add (gpt/to-vec from-h to-h))
(gpt/add (gpt/to-vec from-v to-v)))]
(-> (ctm/empty)
(ctm/add-modifiers fill-modifiers)
(ctm/move position-delta))))
(cond-> (ctm/empty)
(not (ctl/layout-absolute? child))
(-> (ctm/add-modifiers fill-modifiers)
(ctm/move position-delta)))))
(defn line-value

View file

@ -300,13 +300,13 @@
transformed-parent-bounds (delay (gtr/transform-bounds @(get bounds parent-id) modifiers))
children-modifiers
(if flex-layout?
(if (or flex-layout? grid-layout?)
(->> (:shapes parent)
(filter #(ctl/layout-absolute? objects %)))
(:shapes parent))
children-layout
(when flex-layout?
(when (or flex-layout? grid-layout?)
(->> (:shapes parent)
(remove #(ctl/layout-absolute? objects %))))]