Respect devicePixelRatio #67

pull/263/head
Tobias Reich 10 years ago
parent 8c2b053dac
commit 877bb11193

@ -550,11 +550,18 @@ photo = {
// Small is centered in the middle of the screen
var size = 'big',
hasMedium = photo.json.medium!=="",
pixelRatio = window.devicePixelRatio,
view = {
width: $(window).width()-60,
height: $(window).height()-100
};
// Calculate pixel ratio of screen
if (pixelRatio!==undefined&&pixelRatio>1) {
view.width = view.width * pixelRatio;
view.height = view.height * pixelRatio;
}
// Medium available and
// Medium still bigger than screen
if (hasMedium===true&&

Loading…
Cancel
Save