mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-19 06:31:26 +02:00
Emscripten: Attempt to scroll canvas into view
This commit is contained in:
@@ -44,4 +44,10 @@ void MainLoop()
|
||||
{
|
||||
SetFpsLimit(ui::Engine::Ref().GetFpsLimit());
|
||||
MainLoopBody();
|
||||
EM_ASM({
|
||||
let canvas = document.querySelector("canvas.emscripten");
|
||||
if (canvas) {
|
||||
canvas.scrollIntoView(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user