From 82c0414f66f4998c3d61764a1c504e06e62e7ab0 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 27 Oct 2026 12:20:55 +0100 Subject: web: Find Peak dialog, live sliders, graduated fit, load-race fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - click away from a dot now opens a Find Peak list (candidates within 60 px, sorted by distance, name/height/pixel-offset labels) — the desktop dialog equivalent for crowded ridgelines - sliders update on input, not on release - fit is graduated like the original: 1 marker fits the center angle, 2 add scale, 4+ the full viewpoint (removed the >=4 gate) - image load now re-fits once more 120 ms after the first paint (same nudge as the desktop app) so the picture never stays hidden --- crates/gipfel-web/src/markers.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/gipfel-web/src/markers.rs') diff --git a/crates/gipfel-web/src/markers.rs b/crates/gipfel-web/src/markers.rs index 279c62c..d1bf8cb 100644 --- a/crates/gipfel-web/src/markers.rs +++ b/crates/gipfel-web/src/markers.rs @@ -15,9 +15,11 @@ pub struct Marker { } /// Refit the projection parameters to the current markers. -/// With fewer than 4 markers nothing can be fitted (same rule as desktop). +/// Same graduated behavior as the original: 1 marker fits the center +/// angle, 2 add the scale, 4+ the full viewpoint (+ distortion when +/// unlocked and enough markers). pub fn refit(pan: &mut Panorama, markers: &[Marker], fit_distortion: bool) -> Result<(), String> { - if markers.len() < 4 { + if markers.is_empty() { return Ok(()); } let mut obs: Vec = Vec::with_capacity(markers.len()); -- cgit v1.2.3