show: a Ctrl or Cmd wheel zoom takes over the armed zoom click, as in production

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dylan M. TaylorandClaude Opus 5.5 committed 2026-11-27 21:03:59 +00:00
1 parent 481d531fe4
commit 53fbe3000c
1 file changed
+5
+5
View File
@@ -155,7 +155,12 @@ fn canvas_pass(app: &mut SlideApp, ui: &mut Ui, bcx: &mut BodyCx<'_>, show: &mut
.show(&mut child, |ui, body| {
let Some(mut pass) = tool_pass(&body.env) else { return };
let Some(mut space) = pass.space else { return };
let given = show.view.zoom;
show.view = pass.view.unwrap_or_else(|| space.target());
// The canvas zooms only with Ctrl or Cmd + wheel here; that zoom takes over an armed zoom click.
if show.view.zoom != given {
show.zoom_arm = false;
}
show.zoomed = zoom::device(&show.view, p.zoom.pixels_per_point) > p.zoom.scheme.hundred * 1.001;
publish(bcx, show);
if !show.reading {