0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

Add missing attributes when page is exported as svg.

This commit is contained in:
Andrey Antukh 2016-11-10 18:33:18 +01:00
parent 152b20e7b4
commit b6e04b8c39
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -47,16 +47,18 @@
(shape* (get-in @*state* [:shapes sid])))
(mx/defc page-svg
[{:keys [width height] :as page}]
[:svg {:width width
:height height
:version "1.1"
:xmlnsXlink "http://www.w3.org/1999/xlink"
:xmlns "http://www.w3.org/2000/svg"}
(background)
(for [item (reverse (:shapes page))]
(-> (shape item)
(mx/with-key (str item))))])
[{:keys [metadata] :as page}]
(let [{:keys [width height]} metadata]
[:svg {:width width
:height height
:view-box (str "0 0 " width " " height)
:version "1.1"
:xmlnsXlink "http://www.w3.org/1999/xlink"
:xmlns "http://www.w3.org/2000/svg"}
#_(background)
(for [item (reverse (:shapes page))]
(-> (shape item)
(mx/with-key (str item))))]))
(defn render-page
[id]