Home › Forums › WoodMart support forum › Zoom on the product page › Reply To: Zoom on the product page
April 3, 2024 at 3:29 pm
#554614
Luke Nielsen
Keymaster
Hello,
Yep, the code below will help you with that as well. Define it in Theme Settings -> Custom JS -> On document ready.
woodmartThemeModule.$document.on('wdPhotoSwipeBeforeInited', function( event, gallery ) {
gallery.options.getDoubleTapZoom = function (isMouseClick, item) {
if (isMouseClick || 'undefined' !== typeof item.html) {
return 1; // (Here you need to specify the size of the picture after clicking the "Enlarge" button. "1" means that the picture will be enlarged to its original size, if you want it to be enlarged only by half of its size, then you need to specify "0.5".)
} else {
return item.initialZoomLevel < 0.7 ? 1 : 1.33;
}
}
});
Kind Regards