From 39297aa49feed815d68b8955769bd3afa3febf10 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 27 Oct 2026 17:23:43 +0100 Subject: web: probe zoom callback directly (build 27f) --- crates/wipfel/src/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/wipfel/src/app.rs b/crates/wipfel/src/app.rs index 336e7e6..60a4a15 100644 --- a/crates/wipfel/src/app.rs +++ b/crates/wipfel/src/app.rs @@ -149,7 +149,7 @@ fn find_peak_panel(p: &FpProps) -> Html { pub fn app() -> Html { let bitmap = use_state(|| None::); let view = use_state(ViewState::default); - let status = use_state(|| "No image loaded · build 27e".to_string()); + let status = use_state(|| "No image loaded · build 27f".to_string()); let db_status = use_state(|| "Loading hill database…".to_string()); let fit_info = use_state(String::new); let tick = use_state(|| 0u32); @@ -670,11 +670,13 @@ pub fn app() -> Html { zoom: { let view = view.clone(); let user_moved = user_moved.clone(); + let status = status.clone(); Callback::from(move |(cx, cy, factor): (f64, f64, f64)| { *user_moved.borrow_mut() = true; let v = &*view; let ns = (v.scale * factor).clamp(0.02, 64.0); let k = ns / v.scale; + status.set(format!("zoom cb f={factor:.3} s {:.4}->{:.4}", v.scale, ns)); view.set(ViewState { scale: ns, ox: cx - (cx - v.ox) * k, -- cgit v1.2.3