Detect retina support snippet by Thomas Fuchs #854

Merged
merged 2 commits into from Jul 30, 2012

Conversation

Projects
None yet
2 participants
Contributor

sxua commented Jul 30, 2012

Tested on iOS, Android 2.x, Chrome for Android, Safari on MacBook Pro Retina, Firefox mobile (beta) for Android, Opera Mobile (Android).

@sxua sxua Detect retina support for a huge amount of devices by Thomas Fuchs
Tested on iOS, Android 2.x, Chrome for Android, Safari on MacBook Pro Retina, Firefox mobile (beta) for Android, Opera Mobile (Android).
7b167a4

@mourner mourner commented on an outdated diff Jul 30, 2012

src/core/Util.js
@@ -95,6 +95,11 @@ L.Util = {
});
},
+ isRetina: function () {
+ return (('devicePixelRatio' in window && window.devicePixelRatio > 1) ||
@mourner

mourner Jul 30, 2012

Owner

Please move this into Browser.js to be more in ine with other Leaflet code

@mourner mourner added a commit that referenced this pull request Jul 30, 2012

@mourner mourner Merge pull request #854 from sxua/master
Detect retina support snippet by Thomas Fuchs
b9b967e

@mourner mourner merged commit b9b967e into Leaflet:master Jul 30, 2012

Owner

mourner commented Jul 30, 2012

Thanks!

mourner referenced this pull request Nov 4, 2014

Closed

dpi -> dppx? #2258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment