Question: How to resize a canvas to fit the screen?
iSeiryu opened this issue · comments
Is there an easy way to dynamically resize a canvas so it would scale with the window's size change?
Browsers can be opened on many different screens and sized differently too. There are 2 parts to this question:
- How to capture the initial window size to set the initial canvas's size?
- How to resize the canvas together with the window?
It sounds like you're trying to do something akin to this: https://stackoverflow.com/a/8486324/985296
Resizing the canvas element is outside of the scope of this library, as it's not part of the canvas API.
Resizing the canvas element is outside of the scope of this library
I know, hence it was just a question. People that work with Blazor and canvases may run into the same need and might have a solution already that they could share.