Skip to content

Commit

Permalink
link to canvas resize article
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed May 24, 2024
1 parent 28c970d commit 880d4b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/eframe/src/web/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ pub(crate) fn install_resize_observer(runner_ref: &WebRunner) -> Result<(), JsVa
Ok(())
}

// Code ported to Rust from:
// https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
fn get_display_size(resize_observer_entries: js_sys::Array) -> Result<(u32, u32), JsValue> {
let width;
let height;
Expand Down

0 comments on commit 880d4b8

Please sign in to comment.