mirror of
https://github.com/penpot/penpot.git
synced 2025-07-20 21:57:13 +02:00
✨ Use penpot metadata only for whole file export
This commit is contained in:
parent
09b328167c
commit
39bb7f209d
7 changed files with 60 additions and 43 deletions
|
@ -38,6 +38,8 @@
|
|||
frame? (= :frame type)
|
||||
group? (= :group type)
|
||||
|
||||
include-metadata? (mf/use-ctx ed/include-metadata-ctx)
|
||||
|
||||
wrapper-props
|
||||
(-> (obj/clone props)
|
||||
(obj/without ["shape" "children"])
|
||||
|
@ -53,9 +55,11 @@
|
|||
(obj/set! "y" y)
|
||||
(obj/set! "width" width)
|
||||
(obj/set! "height" height)
|
||||
(obj/set! "xmlnsXlink" "http://www.w3.org/1999/xlink")
|
||||
(obj/set! "xmlns" "http://www.w3.org/2000/svg")
|
||||
(obj/set! "xmlns:penpot" "https://penpot.app/xmlns")))
|
||||
(obj/set! "xmlnsXlink" "http://www.w3.org/1999/xlink")
|
||||
(cond->
|
||||
include-metadata?
|
||||
(obj/set! "xmlns:penpot" "https://penpot.app/xmlns"))))
|
||||
|
||||
wrapper-props
|
||||
(cond-> wrapper-props
|
||||
|
@ -66,7 +70,8 @@
|
|||
|
||||
[:& (mf/provider muc/render-ctx) {:value render-id}
|
||||
[:> wrapper-tag wrapper-props
|
||||
[:& ed/export-data {:shape shape}]
|
||||
(when include-metadata?
|
||||
[:& ed/export-data {:shape shape}])
|
||||
[:defs
|
||||
[:& defs/svg-defs {:shape shape :render-id render-id}]
|
||||
[:& filters/filters {:shape shape :filter-id filter-id}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue