I'm using photoswipe gallery in my site, I associated the images to the gallery, now I want to increase the default zoom, but I can not find a solution, someone help me? thank you.
Asked
Active
Viewed 2,587 times
1 Answers
3
I suggest you to use higher resolution photos instead increasing zoom. But if you still need increasing default zoom here it is.
Define these two parameters in your options
object. Edit number 4
below as you wish
var options = {
// ...
// Your other options,
// ...
getDoubleTapZoom: function(isMouseClick, item) {
if(isMouseClick) {
return 4; //<---- This 4
} else {
return item.initialZoomLevel < 0.7 ? 4 : 1.33; //<---- 4 here
}
},
maxSpreadZoom: 4 //<---- and this 4 here
};

Ergec
- 11,608
- 7
- 52
- 62
-
Hey Ergec, thanks for your promt reply. I implemented the code and it is not working on my website. Have you tried to implement it as well? Is it working? Thanks in advance, Manuel – pacc88 Dec 16 '16 at 14:41
-
@pacc88 yes I tested it then and posted my answer. It should work after you clear your cache and make sure there is no syntax error. Is it giving error or what? – Ergec Dec 17 '16 at 16:39
-
Perfect, thank you very much, I wasn't puting a comma, now it works. Do you also know how to put the click event at multiple levels? Namely: first click: 2x zoom, second click: 3x zoom, third click: 4x zoom etc. Thanks in advance. – pacc88 Dec 21 '16 at 10:05
-
how can we attach mouse wheel to it and have 4 or 5 zoom level ? Is it possible ? – marcg Nov 05 '18 at 03:56