-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow canvas size to be controlled by page layout on web target #1661
Copy link
Copy link
Closed
Labels
DS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)H - help wantedSomeone please save usSomeone please save usS - enhancementWouldn't this be the coolest?Wouldn't this be the coolest?
Description
Currently, the web target uses a fixed window size and it sizes the canvas based on it. It would be nice to instead have a mode that allows the canvas to be laid out on the page with CSS layout like flexbox or CSS grid. The resizing of the element can be detected using ResizeObsever, which can also handle pixel-perfect canvas sizing (#1659 (comment)). In this mode, the winit window should not be resizable by user code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)H - help wantedSomeone please save usSomeone please save usS - enhancementWouldn't this be the coolest?Wouldn't this be the coolest?