Use correct canvas size for scale factor change
This commit is contained in:
parent
8f7f3efc0d
commit
c88a4ab221
7 changed files with 69 additions and 52 deletions
|
|
@ -59,7 +59,10 @@ mod wasm {
|
|||
let body = document.body().unwrap();
|
||||
|
||||
// Set a background color for the canvas to make it easier to tell where the canvas is for debugging purposes.
|
||||
canvas.style().set_css_text("background-color: crimson;");
|
||||
canvas
|
||||
.style()
|
||||
.set_property("background-color", "crimson")
|
||||
.unwrap();
|
||||
body.append_child(&canvas).unwrap();
|
||||
|
||||
let log_header = document.create_element("h2").unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue