mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 08:51:41 +02:00
🐛 Fix linecap SVG path property (#6163)
This commit is contained in:
parent
416e9e8e1d
commit
2e41bd7607
1 changed files with 4 additions and 6 deletions
|
@ -435,16 +435,12 @@
|
||||||
|
|
||||||
attrs
|
attrs
|
||||||
(-> attrs
|
(-> attrs
|
||||||
(cond-> linecap
|
|
||||||
(dissoc :strokeLinecap))
|
|
||||||
(cond-> (some? color)
|
(cond-> (some? color)
|
||||||
(dissoc :stroke :strokeWidth :strokeOpacity))
|
(dissoc :stroke :strokeWidth :strokeOpacity))
|
||||||
(update
|
(update
|
||||||
:style
|
:style
|
||||||
(fn [style]
|
(fn [style]
|
||||||
(-> style
|
(-> style
|
||||||
(cond-> linecap
|
|
||||||
(dissoc :strokeLinecap))
|
|
||||||
(cond-> (some? color)
|
(cond-> (some? color)
|
||||||
(dissoc :stroke :strokeWidth :strokeOpacity)))))
|
(dissoc :stroke :strokeWidth :strokeOpacity)))))
|
||||||
(d/without-nils))]
|
(d/without-nils))]
|
||||||
|
@ -461,12 +457,14 @@
|
||||||
|
|
||||||
(and (some? linecap) (cfh/path-shape? shape)
|
(and (some? linecap) (cfh/path-shape? shape)
|
||||||
(or (= linecap :round) (= linecap :square)))
|
(or (= linecap :round) (= linecap :square)))
|
||||||
|
|
||||||
(assoc :stroke-cap-start linecap
|
(assoc :stroke-cap-start linecap
|
||||||
:stroke-cap-end linecap)
|
:stroke-cap-end linecap
|
||||||
|
:stroke-linecap linecap)
|
||||||
|
|
||||||
(d/any-key? (dm/get-in shape [:strokes 0])
|
(d/any-key? (dm/get-in shape [:strokes 0])
|
||||||
:strokeColor :strokeOpacity :strokeWidth
|
:strokeColor :strokeOpacity :strokeWidth
|
||||||
:strokeCapStart :strokeCapEnd)
|
:strokeLinecap :strokeCapStart :strokeCapEnd)
|
||||||
(assoc-in [:strokes 0 :stroke-style] :svg))))
|
(assoc-in [:strokes 0 :stroke-style] :svg))))
|
||||||
|
|
||||||
(defn setup-opacity [shape]
|
(defn setup-opacity [shape]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue