Can I enable Open and Close effect like Photoswipe.com Demo page ?
Opened this issue · 3 comments
ibrahim-sowunmi commented
I would also like to know this
Darthagnon commented
Relevant part of Photoswipe documentation: https://photoswipe.com/opening-or-closing-transition/
I've noticed, too, how the animation is wrong.
Darthagnon commented
I tried adding showHideAnimationType: 'zoom'
to load-photoswipe.js
without any success:
// Save the index of this image then add it to the array
items.push(item);
// Event handler for click on a figure
$figure.addEventListener('click', function(event) {
event.preventDefault(); // prevent the normal behaviour i.e. load the <a> hyperlink
// Get the PSWP element and initialize it with the desired options
var $pswp = document.querySelector('.pswp');
var options = {
index: index,
bgOpacity: 0.8,
showHideOpacity: true,
showHideAnimationType: 'zoom',
focus: 'false',
history: 'false'
}
new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init();
}, false);
});
}, false);