mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 12:40:12 +00:00
♻️ Migrate render-wasm api object-svg to modern component syntax (#9459)
* ♻️ Migrate render-wasm api object-svg to modern component syntax * 📎 Add minor changes Signed-off-by: Andrey Antukh <niwi@niwi.nz> --------- Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
d757f96633
commit
a530cf0dec
@ -320,9 +320,8 @@
|
|||||||
(.postMessage (.-port2 ch) nil)))))
|
(.postMessage (.-port2 ch) nil)))))
|
||||||
|
|
||||||
;; Based on app.main.render/object-svg
|
;; Based on app.main.render/object-svg
|
||||||
(mf/defc object-svg
|
(mf/defc object-svg*
|
||||||
{::mf/props :obj}
|
[{:keys [shape]}]
|
||||||
[{:keys [shape] :as props}]
|
|
||||||
(let [objects (mf/deref refs/workspace-page-objects)
|
(let [objects (mf/deref refs/workspace-page-objects)
|
||||||
shape-wrapper
|
shape-wrapper
|
||||||
(mf/with-memo [shape]
|
(mf/with-memo [shape]
|
||||||
@ -344,7 +343,7 @@
|
|||||||
(defn get-static-markup
|
(defn get-static-markup
|
||||||
[shape]
|
[shape]
|
||||||
(->
|
(->
|
||||||
(mf/element object-svg #js {:shape shape})
|
(mf/element object-svg* #js {:shape shape})
|
||||||
(rds/renderToStaticMarkup)))
|
(rds/renderToStaticMarkup)))
|
||||||
|
|
||||||
;; forward declare helpers so render can call them
|
;; forward declare helpers so render can call them
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user