mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
✨ Add some waits on export-svg (exporter).
This commit is contained in:
parent
3234b19790
commit
044aef8414
1 changed files with 10 additions and 3 deletions
|
@ -199,7 +199,14 @@
|
|||
(process-text-nodes [page]
|
||||
(log/trace :fn :process-text-nodes)
|
||||
(-> (bwr/select-all page "#screenshot foreignObject")
|
||||
(p/then #(p/all (map process-single-text-node %)))))
|
||||
(p/then (fn [nodes]
|
||||
(reduce (fn [res node]
|
||||
(p/then res (fn [res]
|
||||
(-> (process-single-text-node node)
|
||||
(p/then (fn [result]
|
||||
(conj res result)))))))
|
||||
(p/resolved [])
|
||||
nodes)))))
|
||||
|
||||
(replace-nodes-on-main [main nodes]
|
||||
(let [main (parse-xml main)
|
||||
|
@ -232,8 +239,8 @@
|
|||
:scale 4})
|
||||
(bwr/set-cookie! page cookie)
|
||||
(bwr/navigate! page uri)
|
||||
;; (bwr/sleep page 5000)
|
||||
;; (bwr/wait-for page "#screenshot foreignObject" {:visible true})
|
||||
(bwr/wait-for page "#screenshot foreignObject" {:visible true})
|
||||
(bwr/sleep page 2000)
|
||||
;; (bwr/eval! page (js* "() => document.body.style.background = 'transparent'"))
|
||||
page))
|
||||
|
||||
|
|
Loading…
Reference in a new issue