mirror of
https://github.com/penpot/penpot.git
synced 2026-05-06 08:38:40 +00:00
🐛 Fix incorrect opacity assignation on changing fill from solid to gradient
This commit is contained in:
parent
6719902647
commit
9c4b60e95f
@ -720,7 +720,8 @@
|
||||
[{:keys [hex alpha] :as data}]
|
||||
(-> data
|
||||
(assoc :color hex)
|
||||
(assoc :opacity alpha)))
|
||||
(assoc :opacity alpha)
|
||||
(d/without-nils)))
|
||||
|
||||
(defn clear-color-components
|
||||
[data]
|
||||
@ -748,13 +749,14 @@
|
||||
(clear-image-components current-color)
|
||||
|
||||
:else
|
||||
{:opacity opacity
|
||||
:gradient (-> gradient
|
||||
(assoc :type (case type
|
||||
:linear-gradient :linear
|
||||
:radial-gradient :radial))
|
||||
(assoc :stops (mapv clear-color-components stops))
|
||||
(dissoc :shape-id))}))
|
||||
(d/without-nils
|
||||
{:opacity opacity
|
||||
:gradient (-> gradient
|
||||
(assoc :type (case type
|
||||
:linear-gradient :linear
|
||||
:radial-gradient :radial))
|
||||
(assoc :stops (mapv clear-color-components stops))
|
||||
(dissoc :shape-id))})))
|
||||
|
||||
(defn- colorpicker-onchange-runner
|
||||
"Effect event that runs the on-change callback with the latest
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user