0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

Merge pull request #1558 from penpot/fix/problem-svg-import

🐛 Fix problem with svg icons
This commit is contained in:
Alejandro 2022-02-08 12:49:52 +01:00 committed by GitHub
commit ae2a99acb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,6 @@
(ns app.main.ui.shapes.path
(:require
[app.common.logging :as log]
[app.main.ui.context :as muc]
[app.main.ui.shapes.attrs :as attrs]
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
[app.util.object :as obj]
@ -19,10 +18,7 @@
(mf/defc path-shape
{::mf/wrap-props false}
[props]
(let [shape (-> (unchecked-get props "shape")
(dissoc :fill-color)
(dissoc :fill-opacity)
(dissoc :fill-image))
(let [shape (unchecked-get props "shape")
content (:content shape)
pdata (mf/with-memo [content]
(try
@ -34,8 +30,6 @@
:cause e)
"")))
render-id (mf/use-ctx muc/render-ctx)
shape (assoc shape :fill-image (str "fill-image-" render-id))
props (-> (attrs/extract-style-attrs shape)
(obj/set! "d" pdata))]