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

Cleanup ahead of release

This commit is contained in:
Emil Ernerfeldt
2023-05-23 19:44:49 +02:00
parent cb6bcde22c
commit cccdfd246e
7 changed files with 17 additions and 17 deletions

View File

@@ -31,8 +31,10 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
#### Web:
* Prefer the client width/height for the canvas parent [#2804](https://github.com/emilk/egui/pull/2804) (thanks [@samitbasu](https://github.com/samitbasu)!)
* ⚠️ BREAKING: `eframe::start_web` has been replaced with `eframe::WebRunner`, which also installs a nice panic hook (no need for `console_error_panic_hook`).
* ⚠️ BREAKING: WebGPU is now the default web renderer when using the `wgpu` feature of `eframe`. To use WebGL with `wgpu`, you need to add `wgpu = { version = "0.16.0", features = ["webgl"] }` to your own `Cargo.toml`. ([#2945](https://github.com/emilk/egui/pull/2945))
* Add `eframe::WebLogger` for redirecting `log` calls to the web console (`console.log`).
* Prefer the client width/height for the canvas parent [#2804](https://github.com/emilk/egui/pull/2804) (thanks [@samitbasu](https://github.com/samitbasu)!)
* eframe web: Persist app state to local storage when leaving site [#2927](https://github.com/emilk/egui/pull/2927)
* Better panic handling [#2942](https://github.com/emilk/egui/pull/2942) [#2992](https://github.com/emilk/egui/pull/2992)
* Update wasm-bindgen to 0.2.86 [#2995](https://github.com/emilk/egui/pull/2995)

View File

@@ -61,7 +61,7 @@
//! #[wasm_bindgen(constructor)]
//! pub fn new() -> Self {
//! // Redirect [`log`] message to `console.log` and friends:
//! eframe::web::WebLogger::init(log::LevelFilter::Debug).ok();
//! eframe::WebLogger::init(log::LevelFilter::Debug).ok();
//!
//! Self {
//! runner: WebRunner::new(),
@@ -150,7 +150,7 @@ pub use web_sys;
pub mod web;
#[cfg(target_arch = "wasm32")]
pub use web::WebRunner;
pub use web::{WebLogger, WebRunner};
// ----------------------------------------------------------------------------
// When compiling natively
@@ -254,7 +254,7 @@ pub fn run_native(
/// if ui.button("Click each year").clicked() {
/// age += 1;
/// }
/// ui.label(format!("Hello '{}', age {}", name, age));
/// ui.label(format!("Hello '{name}', age {age}"));
/// });
/// })
/// }

View File

@@ -148,6 +148,7 @@ impl BackendPanel {
#[cfg(target_arch = "wasm32")]
ui.collapsing("Web info (location)", |ui| {
ui.style_mut().wrap = Some(false);
ui.monospace(format!("{:#?}", frame.info().web_info.location));
});

View File

@@ -1,7 +1,4 @@
use eframe::{
wasm_bindgen::{self, prelude::*},
web::WebRunner,
};
use eframe::wasm_bindgen::{self, prelude::*};
use crate::WrapApp;
@@ -9,7 +6,7 @@ use crate::WrapApp;
#[derive(Clone)]
#[wasm_bindgen]
pub struct WebHandle {
runner: WebRunner,
runner: eframe::WebRunner,
}
#[wasm_bindgen]
@@ -19,10 +16,10 @@ impl WebHandle {
#[wasm_bindgen(constructor)]
pub fn new() -> Self {
// Redirect [`log`] message to `console.log` and friends:
eframe::web::WebLogger::init(log::LevelFilter::Debug).ok();
eframe::WebLogger::init(log::LevelFilter::Debug).ok();
Self {
runner: WebRunner::new(),
runner: eframe::WebRunner::new(),
}
}