Skip to content

Commit

Permalink
Don't close non-zoomable images on click
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Jan 9, 2024
1 parent 5bca913 commit 1699157
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export function openLightbox(index, dataSource) {
}

function initLightbox() {
const lightbox = new PhotoSwipeLightbox({ pswpModule: () => import('photoswipe') });
const lightbox = new PhotoSwipeLightbox({
clickToCloseNonZoomable: false,
pswpModule: () => import('photoswipe'),
});

// Add filters for the correct open/close animation
lightbox.addFilter('placeholderSrc', (placeholderSrc, content) => {
Expand Down

0 comments on commit 1699157

Please sign in to comment.