egui_web: Fix misplaced resize and other event handlers (#1503)

Fix copy-paste error introduced in #1306
This commit is contained in:
Zachary Kohnen 2022-04-16 10:08:46 +02:00 committed by GitHub
parent 2355828d41
commit abf340c62a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -498,7 +498,7 @@ fn install_document_events(runner_container: &AppRunnerContainer) -> Result<(),
for event_name in &["load", "pagehide", "pageshow", "resize"] {
runner_container.add_event_listener(
&document,
&window,
event_name,
|_: web_sys::Event, runner_lock| {
runner_lock.needs_repaint.set_true();
@ -507,7 +507,7 @@ fn install_document_events(runner_container: &AppRunnerContainer) -> Result<(),
}
runner_container.add_event_listener(
&document,
&window,
"hashchange",
|_: web_sys::Event, mut runner_lock| {
// `epi::Frame::info(&self)` clones `epi::IntegrationInfo`, but we need to modify the original here