Files
zed/crates
yenru0 5fd4113081 image_viewer: Add anchored zoom and pan to the PDF viewer
The PDF viewport lacked the interaction set the image view already had:
ctrl/cmd+wheel and pinch zoomed nothing (plain wheel just scrolled),
middle-drag did not pan, and the zoom actions only applied image-mode
pan math, which does nothing for the scroll-based PDF layout.

- Ctrl/cmd+wheel zooms around the cursor: the native scroll handler on
  the same element runs first in the bubble phase, so the applied wheel
  delta is undone before anchoring the zoom.
- Pinch zooms around the touch point; zoom actions anchor the viewport
  center.
- Middle-drag pans, keeping left-drag for text selection and pen input.
- extract_document_details now falls back to a single mock US-Letter
  page when no native libpdfium is present, mirroring the mock
  rasterizer, so PDFs open on machines without the engine instead of
  failing with an image-format error.
- The annotation mouse test gates on native pdfium like the channel
  order test, since mock pages carry no text.

Anchor math lives in pdf_anchored_scroll_y with unit tests, and a
gpui integration test drives real wheel/drag events to assert the
document point under the cursor stays put while zooming.
2026-10-03 20:33:08 +09:00
..
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-08-09 22:29:52 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-11 09:13:44 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00
2026-09-17 08:49:31 +00:00