feat(image-viewer): scroll wheel to zoom
The timeline image viewer only zoomed via the -/+ buttons and the % toggle. Add scroll-to-zoom (wheel up = in, down = out) for parity with the media-gallery lightbox. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,10 @@ export const ImageViewer = as<'div', ImageViewerProps>(
|
|||||||
className={css.ImageViewerContent}
|
className={css.ImageViewerContent}
|
||||||
justifyContent="Center"
|
justifyContent="Center"
|
||||||
alignItems="Center"
|
alignItems="Center"
|
||||||
|
onWheel={(evt) => {
|
||||||
|
if (evt.deltaY < 0) zoomIn();
|
||||||
|
else if (evt.deltaY > 0) zoomOut();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className={css.ImageViewerImg}
|
className={css.ImageViewerImg}
|
||||||
|
|||||||
Reference in New Issue
Block a user