Skip to content

Commit

Permalink
egui_web: Fix misplaced resize and other event handlers (#1503)
Browse files Browse the repository at this point in the history
Fix copy-paste error introduced in #1306
  • Loading branch information
DusterTheFirst authored Apr 16, 2022
1 parent 2355828 commit abf340c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions egui_web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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
Expand Down

0 comments on commit abf340c

Please sign in to comment.