From f2e4f94a96d37448b64a8e9d601b2fb46b2f1c73 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 7 Nov 2026 22:18:12 -0500 Subject: [PATCH] fix: the image viewer pans without unzooming, scrolls with the wheel, and opens a long strip at full width MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The click that ends a drag no longer resets the zoom. - The wheel scrolls a zoomed image (shift+wheel goes sideways). Ctrl+wheel or a trackpad pinch zooms at the pointer. - Clicking a long strip or panorama zooms it to fill the canvas, so a comic strip opens at reading width. Anything else zooms 2x. The clicked point stays under the cursor. - The zoom limit follows the image's own resolution instead of a flat 4x. - Panning stops at the image's edges. - A zoom bar (−, slider, +, size against full resolution, fit) fades in at the bottom of the canvas, and the shortcut sheet lists the gestures. Co-Authored-By: Claude Opus 5.5 --- frontend/src/components/modal/ImageCanvas.vue | 123 ++++++++++-- frontend/src/components/modal/ImageViewer.vue | 3 + frontend/src/composables/usePanZoom.js | 180 ++++++++++++++---- frontend/test/usePanZoom.spec.js | 75 ++++++++ 4 files changed, 334 insertions(+), 47 deletions(-) create mode 100644 frontend/test/usePanZoom.spec.js diff --git a/frontend/src/components/modal/ImageCanvas.vue b/frontend/src/components/modal/ImageCanvas.vue index f3af01e..4567c90 100644 --- a/frontend/src/components/modal/ImageCanvas.vue +++ b/frontend/src/components/modal/ImageCanvas.vue @@ -2,11 +2,15 @@
+ +
+ + + + + {{ zoomLabel }} + + +