🐛 Fix svg import with null fill-opacity

This commit is contained in:
Alejandro Alonso 2023-05-11 06:29:48 +02:00 committed by Alonso Torres
parent defec189e2
commit f3f708ee9d

View file

@ -100,13 +100,13 @@
(-> (update :svg-attrs dissoc :fill-opacity) (-> (update :svg-attrs dissoc :fill-opacity)
(update-in [:svg-attrs :style] dissoc :fill-opacity) (update-in [:svg-attrs :style] dissoc :fill-opacity)
(assoc-in [:fills 0 :fill-opacity] (-> (get-in shape [:svg-attrs :fill-opacity]) (assoc-in [:fills 0 :fill-opacity] (-> (get-in shape [:svg-attrs :fill-opacity])
(d/parse-double)))) (d/parse-double 1))))
(get-in shape [:svg-attrs :style :fill-opacity]) (get-in shape [:svg-attrs :style :fill-opacity])
(-> (update-in [:svg-attrs :style] dissoc :fill-opacity) (-> (update-in [:svg-attrs :style] dissoc :fill-opacity)
(update :svg-attrs dissoc :fill-opacity) (update :svg-attrs dissoc :fill-opacity)
(assoc-in [:fills 0 :fill-opacity] (-> (get-in shape [:svg-attrs :style :fill-opacity]) (assoc-in [:fills 0 :fill-opacity] (-> (get-in shape [:svg-attrs :style :fill-opacity])
(d/parse-double))))))) (d/parse-double 1)))))))
(defn setup-stroke [shape] (defn setup-stroke [shape]
(let [stroke-linecap (-> (or (get-in shape [:svg-attrs :stroke-linecap]) (let [stroke-linecap (-> (or (get-in shape [:svg-attrs :stroke-linecap])