From 82fdd611702c1404ec77875b9924aef5f671e536 Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Sun, 2 Jun 2024 20:25:29 -0400 Subject: [PATCH] fix:23 (#35) --- components/neroshitron/gallery.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/components/neroshitron/gallery.tsx b/components/neroshitron/gallery.tsx index fc5906c..c0685b8 100644 --- a/components/neroshitron/gallery.tsx +++ b/components/neroshitron/gallery.tsx @@ -88,10 +88,8 @@ const Gallery = ({ id, columns, closeMenu }: GalleryProps) => { setCurrentIndex(images.indexOf(image)); }; - const resetPanZoom = (event: any) => { - if (panZoomRef.current && event.target.id != "image-container") { - panZoomRef.current.autoCenter(); - } + const resetPanZoom = () => { + panZoomRef.current.autoCenter(); }; const close = () => { @@ -107,7 +105,7 @@ const Gallery = ({ id, columns, closeMenu }: GalleryProps) => { const renderButtons = () => { return (
-
+
+