mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 00:31:40 +02:00
🐛 Fix using gradient for shadow fill
This commit is contained in:
parent
4961991e18
commit
aed065eec1
1 changed files with 4 additions and 1 deletions
|
@ -243,7 +243,10 @@
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(rx/of (dch/update-shapes ids (fn [shape]
|
(rx/of (dch/update-shapes ids (fn [shape]
|
||||||
(let [new-attrs (merge (get-in shape [:shadow index :color]) attrs)]
|
(let [;; If we try to set a gradient to a shadow (for example using the color selection from multiple shapes) let's use the first stop color
|
||||||
|
attrs (cond-> attrs
|
||||||
|
(:gradient attrs) (get-in [:gradient :stops 0]))
|
||||||
|
new-attrs (merge (get-in shape [:shadow index :color]) attrs)]
|
||||||
(assoc-in shape [:shadow index :color] new-attrs))))))))
|
(assoc-in shape [:shadow index :color] new-attrs))))))))
|
||||||
|
|
||||||
(defn add-stroke
|
(defn add-stroke
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue