mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 14:38:27 +02:00
🐛 Fix export from shared prototype
This commit is contained in:
parent
0d87dc5680
commit
009236bbe3
15 changed files with 69 additions and 47 deletions
|
@ -17,7 +17,7 @@
|
|||
[promesa.core :as p]))
|
||||
|
||||
(defn render
|
||||
[{:keys [file-id page-id token scale type objects] :as params} on-object]
|
||||
[{:keys [file-id page-id share-id token scale type objects] :as params} on-object]
|
||||
(letfn [(prepare-options [uri]
|
||||
#js {:screen #js {:width bw/default-viewport-width
|
||||
:height bw/default-viewport-height}
|
||||
|
@ -48,9 +48,9 @@
|
|||
;; take the screnshot of requested objects, one by one
|
||||
(p/run! (partial render-object page) objects)
|
||||
nil))]
|
||||
|
||||
(p/let [params {:file-id file-id
|
||||
:page-id page-id
|
||||
:share-id share-id
|
||||
:object-id (mapv :id objects)
|
||||
:route "objects"}
|
||||
uri (-> (cf/get :public-uri)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
[promesa.core :as p]))
|
||||
|
||||
(defn render
|
||||
[{:keys [file-id page-id token scale type objects] :as params} on-object]
|
||||
[{:keys [file-id page-id share-id token scale type objects] :as params} on-object]
|
||||
(letfn [(prepare-options [uri]
|
||||
#js {:screen #js {:width bw/default-viewport-width
|
||||
:height bw/default-viewport-height}
|
||||
|
@ -31,6 +31,7 @@
|
|||
(prepare-uri [base-uri object-id]
|
||||
(let [params {:file-id file-id
|
||||
:page-id page-id
|
||||
:share-id share-id
|
||||
:object-id object-id
|
||||
:route "objects"}]
|
||||
(-> base-uri
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
:height height}))
|
||||
|
||||
(defn render
|
||||
[{:keys [page-id file-id objects token scale type]} on-object]
|
||||
[{:keys [page-id file-id share-id objects token scale type]} on-object]
|
||||
(letfn [(convert-to-ppm [pngpath]
|
||||
(let [ppmpath (str/concat pngpath "origin.ppm")]
|
||||
(l/trace :fn :convert-to-ppm :path ppmpath)
|
||||
|
@ -338,9 +338,9 @@
|
|||
;; take the screnshot of requested objects, one by one
|
||||
(p/run! (partial render-object page) objects)
|
||||
nil))]
|
||||
|
||||
(p/let [params {:file-id file-id
|
||||
:page-id page-id
|
||||
:share-id share-id
|
||||
:render-embed true
|
||||
:object-id (mapv :id objects)
|
||||
:route "objects"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue