0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 00:41:25 -05:00

🐛 Fix gap

This commit is contained in:
Eva 2023-01-12 09:24:03 +01:00 committed by Alonso Torres
parent 8df861faaa
commit 131c2f331e
2 changed files with 8 additions and 10 deletions
common/src/app/common/types/shape
frontend/src/app/main/ui/workspace/sidebar/options/menus

View file

@ -148,11 +148,9 @@
(or (= :row layout-flex-dir) (= :reverse-row layout-flex-dir)))
(defn gaps
[{:keys [layout-gap layout-gap-type]}]
[{:keys [layout-gap]}]
(let [layout-gap-row (or (-> layout-gap :row-gap) 0)
layout-gap-col (if (= layout-gap-type :simple)
layout-gap-row
(or (-> layout-gap :column-gap) 0))]
layout-gap-col (or (-> layout-gap :column-gap) 0)]
[layout-gap-row layout-gap-col]))
(defn child-min-width

View file

@ -250,11 +250,11 @@
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click (fn [event]
(reset! gap-selected? :row-gap)
(reset! gap-selected? :column-gap)
(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)
:value (:row-gap gap-value)
:value (:column-gap gap-value)
:disabled (and (= :no-wrap wrap-type) is-col?)}]]
[:div.gap-row.tooltip.tooltip-bottom-left
@ -264,11 +264,11 @@
[:> numeric-input {:no-validate true
:placeholder "--"
:on-click (fn [event]
(reset! gap-selected? :column-gap)
(reset! gap-selected? :row-gap)
(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)
:value (:column-gap gap-value)
:value (:row-gap gap-value)
:disabled (and (= :no-wrap wrap-type) (not is-col?))}]]]])
(mf/defc layout-container-menu