mirror of
https://github.com/penpot/penpot.git
synced 2025-02-11 01:28:30 -05:00
🐛 Fixing select color for stroke from palette
This commit is contained in:
parent
2bb8c535bd
commit
553c0e6d6a
1 changed files with 11 additions and 1 deletions
|
@ -263,7 +263,17 @@
|
||||||
attrs (merge attrs color-attrs)]
|
attrs (merge attrs color-attrs)]
|
||||||
|
|
||||||
(rx/of (dch/update-shapes ids (fn [shape]
|
(rx/of (dch/update-shapes ids (fn [shape]
|
||||||
(assoc-in shape [:strokes index] (merge (get-in shape [:strokes index]) attrs)))))))))
|
(let [new-attrs (merge (get-in shape [:strokes index]) attrs)
|
||||||
|
new-attrs (cond-> new-attrs
|
||||||
|
(not (contains? new-attrs :stroke-width))
|
||||||
|
(assoc :stroke-width 1)
|
||||||
|
|
||||||
|
(not (contains? new-attrs :stroke-style))
|
||||||
|
(assoc :stroke-style :solid)
|
||||||
|
|
||||||
|
(not (contains? new-attrs :stroke-alignment))
|
||||||
|
(assoc :stroke-alignment :center))]
|
||||||
|
(assoc-in shape [:strokes index] new-attrs)))))))))
|
||||||
|
|
||||||
(defn add-stroke
|
(defn add-stroke
|
||||||
[ids stroke]
|
[ids stroke]
|
||||||
|
|
Loading…
Add table
Reference in a new issue