gallery cleanup
This commit is contained in:
parent
3ea006662f
commit
88578f7af7
@ -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();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user