mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix svg attrs stroke-linecap stroke-linejoin fill-rule
This commit is contained in:
committed by
Alonso Torres
parent
2640889dc8
commit
33417a4b20
@@ -468,14 +468,14 @@
|
||||
[attrs]
|
||||
(let [style (:style attrs)
|
||||
;; 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
|
||||
(dissoc :style)
|
||||
(merge style)
|
||||
(select-keys allowed-keys))
|
||||
fill-rule (-> attrs :fillRule sr/translate-fill-rule)
|
||||
stroke-linecap (-> attrs :strokeLinecap sr/translate-stroke-linecap)
|
||||
stroke-linejoin (-> attrs :strokeLinejoin sr/translate-stroke-linejoin)
|
||||
fill-rule (or (-> attrs :fill-rule sr/translate-fill-rule) (-> attrs :fillRule sr/translate-fill-rule))
|
||||
stroke-linecap (or (-> attrs :stroke-linecap sr/translate-stroke-linecap) (-> attrs :strokeLinecap sr/translate-stroke-linecap))
|
||||
stroke-linejoin (or (-> attrs :stroke-linejoin sr/translate-stroke-linejoin) (-> attrs :strokeLinejoin sr/translate-stroke-linejoin))
|
||||
fill-none (= "none" (-> attrs :fill))]
|
||||
(h/call wasm/internal-module "_set_shape_svg_attrs" fill-rule stroke-linecap stroke-linejoin fill-none)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user