1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

egui_web: Repaint at least every seconds

Just in case the app needs it, e.g. because it has finished a download.
This commit is contained in:
Emil Ernerfeldt
2020-11-18 01:07:32 +01:00
parent fad0029119
commit 86cfd0dcd3
2 changed files with 18 additions and 0 deletions

View File

@@ -200,6 +200,7 @@ pub fn start(app_runner: AppRunner) -> Result<AppRunnerRef, JsValue> {
let runner_ref = AppRunnerRef(Arc::new(Mutex::new(app_runner)));
install_canvas_events(&runner_ref)?;
install_document_events(&runner_ref)?;
repaint_every_ms(&runner_ref, 1000)?; // just in case. TODO: make it a parameter
paint_and_schedule(runner_ref.clone())?;
Ok(runner_ref)
}