mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
Add missing key attr on shape rendering.
This commit is contained in:
parent
95a1bb80df
commit
0b8cc5f964
1 changed files with 5 additions and 4 deletions
|
@ -55,24 +55,25 @@
|
||||||
(select-keys shape [:width :height :view-box :x :y :cx :cy]))
|
(select-keys shape [:width :height :view-box :x :y :cx :cy]))
|
||||||
|
|
||||||
(defmethod -render :builtin/icon
|
(defmethod -render :builtin/icon
|
||||||
[{:keys [data] :as shape} attrs]
|
[{:keys [data id] :as shape} attrs]
|
||||||
(let [attrs (as-> shape $
|
(let [attrs (as-> shape $
|
||||||
(extract-attrs $)
|
(extract-attrs $)
|
||||||
(remove-nil-vals $)
|
(remove-nil-vals $)
|
||||||
(merge $ attrs)
|
(merge $ attrs)
|
||||||
(transform-attrs $))]
|
(transform-attrs $))]
|
||||||
(html
|
(html
|
||||||
[:svg attrs data])))
|
[:svg (merge attrs {:key (str id)})
|
||||||
|
data])))
|
||||||
|
|
||||||
(defmethod -render :builtin/icon-svg
|
(defmethod -render :builtin/icon-svg
|
||||||
[{:keys [image] :as shape} attrs]
|
[{:keys [image id] :as shape} attrs]
|
||||||
(let [attrs (as-> shape $
|
(let [attrs (as-> shape $
|
||||||
(extract-attrs $)
|
(extract-attrs $)
|
||||||
(remove-nil-vals $)
|
(remove-nil-vals $)
|
||||||
(merge $ attrs)
|
(merge $ attrs)
|
||||||
(transform-attrs $))]
|
(transform-attrs $))]
|
||||||
(html
|
(html
|
||||||
[:svg attrs
|
[:svg (merge attrs {:key (str id)})
|
||||||
[:image image]])))
|
[:image image]])))
|
||||||
|
|
||||||
(defmethod -move ::shape
|
(defmethod -move ::shape
|
||||||
|
|
Loading…
Reference in a new issue