mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
Add missing attributes when page is exported as svg.
This commit is contained in:
parent
152b20e7b4
commit
b6e04b8c39
1 changed files with 12 additions and 10 deletions
|
@ -47,16 +47,18 @@
|
||||||
(shape* (get-in @*state* [:shapes sid])))
|
(shape* (get-in @*state* [:shapes sid])))
|
||||||
|
|
||||||
(mx/defc page-svg
|
(mx/defc page-svg
|
||||||
[{:keys [width height] :as page}]
|
[{:keys [metadata] :as page}]
|
||||||
[:svg {:width width
|
(let [{:keys [width height]} metadata]
|
||||||
:height height
|
[:svg {:width width
|
||||||
:version "1.1"
|
:height height
|
||||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
:view-box (str "0 0 " width " " height)
|
||||||
:xmlns "http://www.w3.org/2000/svg"}
|
:version "1.1"
|
||||||
(background)
|
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||||
(for [item (reverse (:shapes page))]
|
:xmlns "http://www.w3.org/2000/svg"}
|
||||||
(-> (shape item)
|
#_(background)
|
||||||
(mx/with-key (str item))))])
|
(for [item (reverse (:shapes page))]
|
||||||
|
(-> (shape item)
|
||||||
|
(mx/with-key (str item))))]))
|
||||||
|
|
||||||
(defn render-page
|
(defn render-page
|
||||||
[id]
|
[id]
|
||||||
|
|
Loading…
Reference in a new issue