mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🐛 Fix opacity display when selecting multiple shapes
This commit is contained in:
parent
9fbdc10971
commit
d63e5f520e
1 changed files with 6 additions and 6 deletions
|
@ -23,11 +23,11 @@
|
|||
|
||||
(defn opacity->string
|
||||
[opacity]
|
||||
(if (= opacity :multiple)
|
||||
""
|
||||
(if (not= opacity :multiple)
|
||||
(dm/str (-> opacity
|
||||
(d/coalesce 1)
|
||||
(* 100)))))
|
||||
(* 100)))
|
||||
:multiple))
|
||||
|
||||
(mf/defc layer-menu
|
||||
{::mf/wrap-props false}
|
||||
|
@ -39,7 +39,7 @@
|
|||
blocked? (:blocked values)
|
||||
|
||||
current-blend-mode (or (:blend-mode values) :normal)
|
||||
current-opacity (:opacity values)
|
||||
current-opacity (opacity->string (:opacity values))
|
||||
|
||||
state* (mf/use-state
|
||||
{:selected-blend-mode current-blend-mode
|
||||
|
@ -161,8 +161,8 @@
|
|||
:title (tr "workspace.options.opacity")}
|
||||
[:span {:class (stl/css :icon)} "%"]
|
||||
[:> numeric-input*
|
||||
{:value (opacity->string current-opacity)
|
||||
:placeholder (tr "settings.multiple")
|
||||
{:value current-opacity
|
||||
:placeholder "--"
|
||||
:on-change handle-opacity-change
|
||||
:min 0
|
||||
:max 100
|
||||
|
|
Loading…
Add table
Reference in a new issue