mirror of
https://github.com/penpot/penpot.git
synced 2026-09-09 13:39:02 +00:00
🐛 Fix svg attrs stroke-linecap stroke-linejoin fill-rule
This commit is contained in:
parent
2640889dc8
commit
33417a4b20
@ -468,14 +468,14 @@
|
|||||||
[attrs]
|
[attrs]
|
||||||
(let [style (:style attrs)
|
(let [style (:style attrs)
|
||||||
;; Filter to only supported attributes
|
;; Filter to only supported attributes
|
||||||
allowed-keys #{:fill :fillRule :strokeLinecap :strokeLinejoin}
|
allowed-keys #{:fill :fillRule :fill-rule :strokeLinecap :stroke-linecap :strokeLinejoin :stroke-linejoin}
|
||||||
attrs (-> attrs
|
attrs (-> attrs
|
||||||
(dissoc :style)
|
(dissoc :style)
|
||||||
(merge style)
|
(merge style)
|
||||||
(select-keys allowed-keys))
|
(select-keys allowed-keys))
|
||||||
fill-rule (-> attrs :fillRule sr/translate-fill-rule)
|
fill-rule (or (-> attrs :fill-rule sr/translate-fill-rule) (-> attrs :fillRule sr/translate-fill-rule))
|
||||||
stroke-linecap (-> attrs :strokeLinecap sr/translate-stroke-linecap)
|
stroke-linecap (or (-> attrs :stroke-linecap sr/translate-stroke-linecap) (-> attrs :strokeLinecap sr/translate-stroke-linecap))
|
||||||
stroke-linejoin (-> attrs :strokeLinejoin sr/translate-stroke-linejoin)
|
stroke-linejoin (or (-> attrs :stroke-linejoin sr/translate-stroke-linejoin) (-> attrs :strokeLinejoin sr/translate-stroke-linejoin))
|
||||||
fill-none (= "none" (-> attrs :fill))]
|
fill-none (= "none" (-> attrs :fill))]
|
||||||
(h/call wasm/internal-module "_set_shape_svg_attrs" fill-rule stroke-linecap stroke-linejoin fill-none)))
|
(h/call wasm/internal-module "_set_shape_svg_attrs" fill-rule stroke-linecap stroke-linejoin fill-none)))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user