mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 15:21:38 +02:00
🐛 Fixed problem with old svgs
This commit is contained in:
parent
17d28ed9bc
commit
bb04181abf
3 changed files with 49 additions and 35 deletions
|
@ -9,14 +9,15 @@
|
|||
|
||||
(ns app.main.ui.shapes.svg-raw
|
||||
(:require
|
||||
[app.common.data :as cd]
|
||||
[app.common.geom.matrix :as gmt]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.main.ui.shapes.attrs :as usa]
|
||||
[app.util.data :as ud]
|
||||
[app.common.data :as cd]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.util.object :as obj]
|
||||
[app.util.svg :as usvg]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.alpha :as mf]))
|
||||
|
||||
|
@ -49,6 +50,8 @@
|
|||
|
||||
(defn set-styles [attrs shape]
|
||||
(let [custom-attrs (usa/extract-style-attrs shape)
|
||||
attrs (cond-> attrs
|
||||
(string? (:style attrs)) usvg/clean-attrs)
|
||||
style (obj/merge! (clj->js (:style attrs {}))
|
||||
(obj/get custom-attrs "style"))]
|
||||
(-> (clj->js attrs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue