mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -05:00
:fix: Problem with opacity fill
This commit is contained in:
parent
0f5ce3b836
commit
50ef7a8c73
2 changed files with 27 additions and 23 deletions
|
@ -166,7 +166,10 @@
|
|||
(assoc-in [:workspace-local :picked-shift?] shift?)))))
|
||||
|
||||
|
||||
(defn change-fill [ids color id file-id]
|
||||
(defn change-fill
|
||||
([ids color id file-id]
|
||||
(change-fill ids color 1 id file-id))
|
||||
([ids color opacity id file-id]
|
||||
(ptk/reify ::change-fill
|
||||
ptk/WatchEvent
|
||||
(watch [_ state s]
|
||||
|
@ -180,6 +183,7 @@
|
|||
shape-ids (filter (comp not is-text?) ids)
|
||||
update-fn (fn [shape] (assoc shape
|
||||
:fill-color color
|
||||
:fill-opacity opacity
|
||||
:fill-color-ref-id id
|
||||
:fill-color-ref-file file-id))
|
||||
editor (get-in state [:workspace-local :editor])
|
||||
|
@ -190,7 +194,7 @@
|
|||
|
||||
(rx/from (conj
|
||||
(map #(dwt/update-text-attrs {:id % :editor editor :attrs converted-attrs}) text-ids)
|
||||
(dwc/update-shapes shape-ids update-fn)))))))
|
||||
(dwc/update-shapes shape-ids update-fn))))))))
|
||||
|
||||
(defn change-stroke [ids color id file-id]
|
||||
(ptk/reify ::change-stroke
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
(mf/use-callback
|
||||
(mf/deps ids)
|
||||
(fn [value opacity id file-id]
|
||||
(st/emit! (dc/change-fill ids value id file-id))))
|
||||
(st/emit! (dc/change-fill ids value opacity id file-id))))
|
||||
|
||||
on-open-picker
|
||||
(mf/use-callback
|
||||
|
|
Loading…
Add table
Reference in a new issue