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 (
-
+
+