mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 16:56:40 +02:00
🐛 Fix WebGL warning when switching pages
This commit is contained in:
parent
12ec3b4942
commit
2f80d337ad
3 changed files with 15 additions and 8 deletions
|
@ -460,11 +460,6 @@
|
|||
:stencil true
|
||||
:alpha true})
|
||||
|
||||
(defn clear-canvas
|
||||
[]
|
||||
;; TODO: perform corresponding cleaning
|
||||
)
|
||||
|
||||
(defn resize-viewbox
|
||||
[width height]
|
||||
(h/call internal-module "_resize_viewbox" width height))
|
||||
|
@ -488,10 +483,14 @@
|
|||
;; Initialize Wasm Render Engine
|
||||
(h/call internal-module "_init" (/ (.-width ^js canvas) dpr) (/ (.-height ^js canvas) dpr))
|
||||
(h/call internal-module "_set_render_options" flags dpr))
|
||||
|
||||
(set! (.-width canvas) (* dpr (.-clientWidth ^js canvas)))
|
||||
(set! (.-height canvas) (* dpr (.-clientHeight ^js canvas))))
|
||||
|
||||
(defn clear-canvas
|
||||
[]
|
||||
;; TODO: perform corresponding cleaning
|
||||
(h/call internal-module "_clean_up"))
|
||||
|
||||
(defn set-canvas-background
|
||||
[background]
|
||||
(let [rgba (rgba-from-hex background 1)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue