diff --git a/frontend/src/app/main/data/workspace/svg_upload.cljs b/frontend/src/app/main/data/workspace/svg_upload.cljs index 1c403d0b23..6e564b1d30 100644 --- a/frontend/src/app/main/data/workspace/svg_upload.cljs +++ b/frontend/src/app/main/data/workspace/svg_upload.cljs @@ -124,7 +124,7 @@ (get-in shape [:svg-attrs :style :stroke-opacity]) (-> (update-in [:svg-attrs :style] dissoc :stroke-opacity) - (assoc-in [:fills 0 :stroke-opacity] (-> (get-in shape [:svg-attrs :style :stroke-opacity]) + (assoc-in [:strokes 0 :stroke-opacity] (-> (get-in shape [:svg-attrs :style :stroke-opacity]) (d/parse-double)))) (get-in shape [:svg-attrs :stroke-width]) @@ -395,14 +395,12 @@ :image (create-image-shape name frame-id svg-data element-data) #_other (create-raw-svg name frame-id svg-data element-data)))] (when (some? shape) - (let [shape (assoc shape :fills []) - shape (assoc shape :strokes []) - - shape (when (some? shape) - (-> shape - (assoc :svg-defs (select-keys (:defs svg-data) references)) - (setup-fill) - (setup-stroke))) + (let [shape (-> shape + (assoc :fills []) + (assoc :strokes []) + (assoc :svg-defs (select-keys (:defs svg-data) references)) + (setup-fill) + (setup-stroke)) children (cond->> (:content element-data) (or (= tag :g) (= tag :svg)) diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index fa69ae097f..b124aca045 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -6,6 +6,7 @@ (ns app.main.ui.shapes.custom-stroke (:require + [app.common.colors :as clr] [app.common.data :as d] [app.common.data.macros :as dm] [app.common.geom.shapes :as gsh] @@ -382,6 +383,14 @@ (some? style) (obj/set! "style" style))) + (some? (:svg-attrs shape)) + (let [style + (-> (obj/get props "style") + (obj/clone) + (obj/set! "fill" clr/black))] + (-> props + (obj/set! "style" style))) + (and (= :path (:type shape)) (empty? (:fills shape))) (let [style (-> (obj/get props "style")