mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
Merge pull request #1558 from penpot/fix/problem-svg-import
🐛 Fix problem with svg icons
This commit is contained in:
commit
ae2a99acb0
1 changed files with 1 additions and 7 deletions
|
@ -7,7 +7,6 @@
|
||||||
(ns app.main.ui.shapes.path
|
(ns app.main.ui.shapes.path
|
||||||
(:require
|
(:require
|
||||||
[app.common.logging :as log]
|
[app.common.logging :as log]
|
||||||
[app.main.ui.context :as muc]
|
|
||||||
[app.main.ui.shapes.attrs :as attrs]
|
[app.main.ui.shapes.attrs :as attrs]
|
||||||
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
|
[app.main.ui.shapes.custom-stroke :refer [shape-custom-stroke]]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
|
@ -19,10 +18,7 @@
|
||||||
(mf/defc path-shape
|
(mf/defc path-shape
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
(let [shape (-> (unchecked-get props "shape")
|
(let [shape (unchecked-get props "shape")
|
||||||
(dissoc :fill-color)
|
|
||||||
(dissoc :fill-opacity)
|
|
||||||
(dissoc :fill-image))
|
|
||||||
content (:content shape)
|
content (:content shape)
|
||||||
pdata (mf/with-memo [content]
|
pdata (mf/with-memo [content]
|
||||||
(try
|
(try
|
||||||
|
@ -34,8 +30,6 @@
|
||||||
:cause e)
|
: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)
|
props (-> (attrs/extract-style-attrs shape)
|
||||||
(obj/set! "d" pdata))]
|
(obj/set! "d" pdata))]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue