Comments (5)
I know.
I also mention it in the readme - Mozilla's implementation makes it impossible (at least until someone finds a workaround) to defer between zoom level and devicePixelRatio.
I'm still pondering about this issue...
Sent from my iPhone
On Feb 17, 2013, at 0:13, zdmytriv [email protected] wrote:
At 100% zoom I'm getting:
Current zoom level: 2.00
Device Pixel Aspect Ratio: 2.00—
Reply to this email directly or view it on GitHub.
from detect-zoom.
Is there any other way to detect that it is a retina screen? I suppose you could then expect the zoom to come out as 2.00 and then adjust it behind the scenes back to 1.0 and thus only if the zoom reads more or less than 2.0 would it have a non 1.0 zoom.
Just thinking out loud here. I sadly don't have a retina display to test with, or I would try and figure out a way around the issue since the FF devs are being pretty stubborn here: https://bugzilla.mozilla.org/show_bug.cgi?id=809788
from detect-zoom.
yeah, I know. comments 22 and 24 there are mine...
On Feb 27, 2013, at 21:19 , Robert Schultz [email protected] wrote:
Is there any other way to detect that it is a retina screen? I suppose you could then expect the zoom to come out as 2.00 and then adjust it behind the scenes back to 1.0 and thus only if the zoom reads more or less than 2.0 would it have a non 1.0 zoom.
Just thinking out loud here. I sadly don't have a retina display to test with, or I would try and figure out a way around the issue since the FF devs are being pretty stubborn here: https://bugzilla.mozilla.org/show_bug.cgi?id=809788
—
Reply to this email directly or view it on GitHub.
from detect-zoom.
FYI - This issue is occurring for me with Chrome Version 25.0.1364.172 m on a Dell U2711 monitor with Windows 7. DPI is 109ppi with an overall resolution of 2560x1440. Firefox works fine for me; I tested 16.0.1, 18.0.1 and 19.0.2.
from detect-zoom.
In the latest firefox you want to make this change
@@ -189,8 +189,9 @@
* @private
*/
var firefox18 = function () {
+ var zoom = Math.round(((window.outerWidth) / window.innerWidth)*100) / 100;
return {
- zoom: firefox4().zoom,
+ zoom: zoom,
devicePxPerCssPx: devicePixelRatio()
};
};
from detect-zoom.
Related Issues (20)
- Pls confirm my fix for failing detection of IE8 HOT 1
- FF 19.0 document.body errors as null. HOT 8
- detectZoom not defined HOT 6
- Invalid zoom in Chrome when touch/pen/tablet input devices is plugged into a desktop/laptop computer HOT 8
- Not working on latest Webkit Nightlies HOT 12
- Doesn't seem to detect "text only" zoom in Firefox HOT 2
- Doesn't work in Chrome 27 (which is now the current release channel version) HOT 3
- Uncaught TypeError when js included in head (Chrome 27)
- READ THIS: Detect-zoom is currently unusable for desktop HOT 10
- Typo in wiki
- detect-zoom changes zoom when you resize the browser window in Chrome HOT 1
- Incorrect value for zoom inside iframe in Chrome HOT 1
- More Accurate Device Pixel Ratio Function HOT 1
- Idea check the client width of a known Element HOT 1
- Collaboration request HOT 1
- should use screen.width/window.innerWidth for chrome HOT 2
- Firefox new version change default zoom HOT 2
- Wrong .device() on iOS 10
- Polling needed or event model exists?
- typescript version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detect-zoom.