🐛 Fix problem with opacity in imported SVG's

This commit is contained in:
alonso.torres 2023-04-03 09:24:54 +02:00
parent cc469b116d
commit 5856e3cc03
2 changed files with 7 additions and 3 deletions

View file

@ -164,11 +164,13 @@
(cond-> shape
(get-in shape [:svg-attrs :opacity])
(-> (update :svg-attrs dissoc :opacity)
(assoc :opacity (get-in shape [:svg-attrs :opacity])))
(assoc :opacity (-> (get-in shape [:svg-attrs :opacity])
(d/parse-double))))
(get-in shape [:svg-attrs :style :opacity])
(-> (update-in [:svg-attrs :style] dissoc :opacity)
(assoc :opacity (get-in shape [:svg-attrs :style :opacity])))
(assoc :opacity (-> (get-in shape [:svg-attrs :style :opacity])
(d/parse-double))))
(get-in shape [:svg-attrs :mix-blend-mode])
@ -410,7 +412,8 @@
(assoc :strokes [])
(assoc :svg-defs (select-keys (:defs svg-data) references))
(setup-fill)
(setup-stroke))
(setup-stroke)
(setup-opacity))
shape (cond-> shape
hidden (assoc :hidden true))