mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 20:41:39 +02:00
🐛 Fix fill inside grid layout
This commit is contained in:
parent
0468b6acca
commit
59bd9c132e
4 changed files with 57 additions and 36 deletions
|
@ -712,7 +712,6 @@
|
|||
(defn update-position
|
||||
"Move shapes to a new position"
|
||||
[id position]
|
||||
(js/console.log "DEBUG" (pr-str position))
|
||||
(dm/assert! (uuid? id))
|
||||
|
||||
(ptk/reify ::update-position
|
||||
|
|
|
@ -75,9 +75,9 @@
|
|||
[_ shape objects]
|
||||
(let [parent (cph/get-parent objects (:id shape))]
|
||||
(when (and (ctl/flex-layout-immediate-child? objects shape)
|
||||
(or (and (contains? #{:row :reverse-row} (:layout-flex-dir parent))
|
||||
(or (and (contains? #{:row :row-reverse} (:layout-flex-dir parent))
|
||||
(= :fill (:layout-item-h-sizing shape)))
|
||||
(and (contains? #{:column :column-row} (:layout-flex-dir parent))
|
||||
(and (contains? #{:column :column-reverse} (:layout-flex-dir parent))
|
||||
(= :fill (:layout-item-v-sizing shape)))))
|
||||
1)))
|
||||
|
||||
|
@ -90,10 +90,10 @@
|
|||
(cond
|
||||
(and (ctl/flex-layout-immediate-child? objects shape)
|
||||
(or (and (= type :height)
|
||||
(contains? #{:row :reverse-row} (:layout-flex-dir parent))
|
||||
(contains? #{:row :row-reverse} (:layout-flex-dir parent))
|
||||
(= :fill (:layout-item-v-sizing shape)))
|
||||
(and (= type :width)
|
||||
(contains? #{:column :column-row} (:layout-flex-dir parent))
|
||||
(contains? #{:column :column-reverse} (:layout-flex-dir parent))
|
||||
(= :fill (:layout-item-h-sizing shape)))))
|
||||
:fill
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue