mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 21:32:56 +02:00
🐛 Fix gap
This commit is contained in:
parent
8df861faaa
commit
131c2f331e
2 changed files with 8 additions and 10 deletions
|
@ -148,11 +148,9 @@
|
||||||
(or (= :row layout-flex-dir) (= :reverse-row layout-flex-dir)))
|
(or (= :row layout-flex-dir) (= :reverse-row layout-flex-dir)))
|
||||||
|
|
||||||
(defn gaps
|
(defn gaps
|
||||||
[{:keys [layout-gap layout-gap-type]}]
|
[{:keys [layout-gap]}]
|
||||||
(let [layout-gap-row (or (-> layout-gap :row-gap) 0)
|
(let [layout-gap-row (or (-> layout-gap :row-gap) 0)
|
||||||
layout-gap-col (if (= layout-gap-type :simple)
|
layout-gap-col (or (-> layout-gap :column-gap) 0)]
|
||||||
layout-gap-row
|
|
||||||
(or (-> layout-gap :column-gap) 0))]
|
|
||||||
[layout-gap-row layout-gap-col]))
|
[layout-gap-row layout-gap-col]))
|
||||||
|
|
||||||
(defn child-min-width
|
(defn child-min-width
|
||||||
|
|
|
@ -250,11 +250,11 @@
|
||||||
[:> numeric-input {:no-validate true
|
[:> numeric-input {:no-validate true
|
||||||
:placeholder "--"
|
:placeholder "--"
|
||||||
:on-click (fn [event]
|
:on-click (fn [event]
|
||||||
(reset! gap-selected? :row-gap)
|
(reset! gap-selected? :column-gap)
|
||||||
(dom/select-target event))
|
(dom/select-target event))
|
||||||
:on-change (partial set-gap (= :no-wrap wrap-type) :row-gap)
|
:on-change (partial set-gap (= :no-wrap wrap-type) :column-gap)
|
||||||
:on-blur #(reset! gap-selected? :none)
|
:on-blur #(reset! gap-selected? :none)
|
||||||
:value (:row-gap gap-value)
|
:value (:column-gap gap-value)
|
||||||
:disabled (and (= :no-wrap wrap-type) is-col?)}]]
|
:disabled (and (= :no-wrap wrap-type) is-col?)}]]
|
||||||
|
|
||||||
[:div.gap-row.tooltip.tooltip-bottom-left
|
[:div.gap-row.tooltip.tooltip-bottom-left
|
||||||
|
@ -264,11 +264,11 @@
|
||||||
[:> numeric-input {:no-validate true
|
[:> numeric-input {:no-validate true
|
||||||
:placeholder "--"
|
:placeholder "--"
|
||||||
:on-click (fn [event]
|
:on-click (fn [event]
|
||||||
(reset! gap-selected? :column-gap)
|
(reset! gap-selected? :row-gap)
|
||||||
(dom/select-target event))
|
(dom/select-target event))
|
||||||
:on-change (partial set-gap (= :no-wrap wrap-type) :column-gap)
|
:on-change (partial set-gap (= :no-wrap wrap-type) :row-gap)
|
||||||
:on-blur #(reset! gap-selected? :none)
|
:on-blur #(reset! gap-selected? :none)
|
||||||
:value (:column-gap gap-value)
|
:value (:row-gap gap-value)
|
||||||
:disabled (and (= :no-wrap wrap-type) (not is-col?))}]]]])
|
:disabled (and (= :no-wrap wrap-type) (not is-col?))}]]]])
|
||||||
|
|
||||||
(mf/defc layout-container-menu
|
(mf/defc layout-container-menu
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue