mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 01:27:16 +02:00
🐛 Fix problem when changing colorpicker alpha (#5770)
This commit is contained in:
parent
0b90722d5a
commit
cdfc0fd988
3 changed files with 34 additions and 1 deletions
|
@ -181,7 +181,8 @@
|
|||
(when (or (not= (str/lower (:hex color)) (str/lower (:hex current-color)))
|
||||
(not= (:h color) (:h current-color))
|
||||
(not= (:s color) (:s current-color))
|
||||
(not= (:v color) (:v current-color)))
|
||||
(not= (:v color) (:v current-color))
|
||||
(not= (:alpha color) (:alpha current-color)))
|
||||
(let [recent-color (merge current-color color)
|
||||
recent-color (dc/materialize-color-components recent-color)]
|
||||
(st/emit! (dc/update-colorpicker-color recent-color (not @drag?)))))))
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
:hue (= type :hue)
|
||||
:opacity (= type :opacity)
|
||||
:value (= type :value)))
|
||||
:data-testid (when (= type :opacity) "slider-opacity")
|
||||
:on-pointer-down handle-start-drag
|
||||
:on-pointer-up handle-stop-drag
|
||||
:on-lost-pointer-capture handle-stop-drag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue