gallery cleanup

This commit is contained in:
Denys Konovalov 2022-12-31 18:12:22 +01:00
parent 9282b8c0d3
commit f1e6c658d5

View File

@ -35,7 +35,6 @@ $( document ).ready(function() {
title : $title, title : $title,
msrc : $msrc msrc : $msrc
}; };
console.log("Using pre-defined dimensions for " + $src);
// if not, set temp default size then load the image to check actual size // if not, set temp default size then load the image to check actual size
} else { } else {
var item = { var item = {
@ -45,7 +44,6 @@ $( document ).ready(function() {
title : $title, title : $title,
msrc : $msrc msrc : $msrc
}; };
console.log("Using default dimensions for " + $src);
// load the image to check its dimensions // load the image to check its dimensions
// update the item as soon as w and h are known (check every 30ms) // update the item as soon as w and h are known (check every 30ms)
var img = new Image(); var img = new Image();
@ -57,7 +55,7 @@ $( document ).ready(function() {
clearInterval(wait); clearInterval(wait);
item.w = w; item.w = w;
item.h = h; item.h = h;
console.log("Got actual dimensions for " + img.src); // console.log("Got actual dimensions for " + img.src);
} }
}, 30); }, 30);
} }
@ -71,8 +69,9 @@ $( document ).ready(function() {
var $pswp = $('.pswp')[0]; var $pswp = $('.pswp')[0];
var options = { var options = {
index: index, index: index,
bgOpacity: 0.8, bgOpacity: 0.9,
showHideOpacity: true showHideOpacity: true,
loop: false,
} }
new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init(); new PhotoSwipe($pswp, PhotoSwipeUI_Default, items, options).init();
}); });