mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
✨ Export pdf using the new render
This commit is contained in:
parent
585d6944fc
commit
1fced0c67b
@ -180,6 +180,15 @@
|
|||||||
(and (wasm-export-enabled? state)
|
(and (wasm-export-enabled? state)
|
||||||
(contains? wasm-export-types (:type export))))
|
(contains? wasm-export-types (:type export))))
|
||||||
|
|
||||||
|
(defn- request-simple-export-wasm
|
||||||
|
[export]
|
||||||
|
(ptk/reify ::request-simple-export-wasm
|
||||||
|
ptk/EffectEvent
|
||||||
|
(effect [_ _ _]
|
||||||
|
(case (:type export)
|
||||||
|
:pdf (wasm.exports/export-pdf export)
|
||||||
|
(wasm.exports/export-image export)))))
|
||||||
|
|
||||||
(defn request-simple-export
|
(defn request-simple-export
|
||||||
[{:keys [export]}]
|
[{:keys [export]}]
|
||||||
(ptk/reify ::request-simple-export
|
(ptk/reify ::request-simple-export
|
||||||
@ -192,11 +201,7 @@
|
|||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
(if (use-wasm-export? state export)
|
(if (use-wasm-export? state export)
|
||||||
(do
|
(rx/of (request-simple-export-wasm export))
|
||||||
(case (:type export)
|
|
||||||
:pdf (wasm.exports/export-pdf export)
|
|
||||||
(wasm.exports/export-image export))
|
|
||||||
(rx/empty))
|
|
||||||
(let [profile-id (:profile-id state)
|
(let [profile-id (:profile-id state)
|
||||||
params {:exports [export]
|
params {:exports [export]
|
||||||
:profile-id profile-id
|
:profile-id profile-id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user