FEATURE: add support for device pixel ratio = 3

This commit is contained in:
Régis Hanol
2015-05-28 01:48:07 +02:00
parent 4f1a72f729
commit e101396ea1
4 changed files with 8 additions and 8 deletions
@@ -32,7 +32,7 @@ Discourse.Utilities = {
getRawSize: function(size) {
var pixelRatio = window.devicePixelRatio || 1;
return pixelRatio >= 1.5 ? size * 2 : size;
return size * Math.min(3, Math.max(1, Math.round(pixelRatio)));
},
avatarImg: function(options) {