Большие картинки для дисплеев с высоким разрешением

This commit is contained in:
Krivchikov Dmitry 2014-10-06 16:09:56 +04:00
parent 58d92f7cf4
commit 22a1b414b8
1 changed files with 5 additions and 1 deletions

View File

@ -92,7 +92,11 @@ function showImage(id)
photos = []; photos = [];
point.images.forEach(function(entry) { point.images.forEach(function(entry) {
if (window.devicePixelRatio > 1) {
photos.push({img: '/photos/big/'+entry, thumb: '/photos/small/'+entry});
} else {
photos.push({img: '/photos/middle/'+entry, thumb: '/photos/small/'+entry}); photos.push({img: '/photos/middle/'+entry, thumb: '/photos/small/'+entry});
}
}); });
$('.fotorama').fotorama({data: photos}); $('.fotorama').fotorama({data: photos});