detect-zoom icon indicating copy to clipboard operation
detect-zoom copied to clipboard

Fixed zoom detection for webkit(desktop) and Issue #41

Open bitjoo opened this issue 11 years ago • 5 comments

I have tested my webkit patch in the latest chromium 28. And on Windows Chrome 27. Worked with devtools on the right side, activated sidbar and in iframes as well.

I have also fixed the uncaught type exception bug (#41).

bitjoo avatar Aug 30 '13 22:08 bitjoo

@bitwire cool, thanks! I'll play with it a bit and merge and change the documentation accordingly this week.

tombigel avatar Sep 08 '13 11:09 tombigel

Manually applied the patch and ran some basic tests (chrome 30 on mac) and seems to work great. Did you find issues or any thoughts on officially merging?

timbarlotta avatar Oct 03 '13 21:10 timbarlotta

Because document.width was deprecated and is now undefined in Chrome 30, I made some changes to my code and using the opera detection for webkit now. Tested in Chromium Version 30.0.1599.114 Built on Ubuntu 13.04, running on LinuxMint 15 (30.0.1599.114-0ubuntu0.13.04.2)

Please have a look.

bitjoo avatar Nov 21 '13 21:11 bitjoo

@bitwire Doesn't look like your latest pull request is working anymore. Might it be possible to use window.devicePixelRatio now, which has been implemented in Chrome since v31?

Cheers!

nhodges avatar Jan 18 '14 00:01 nhodges

@nhodges Thank you for your hint. Yes, you can use window.devicePixelRatio. Since Chrome 31 it takes full-page zoom, but not pinch zoom, into account. To get sure, I added a solution with a SVG (iframes not supported). I had to change the browser detection as well, because in Chrome 31 they removed support for the prefixed -webkit-marquee.

If you want to support only the latest browsers for full-page zoom, you can get rid of this plugin and just use window.devicePixelRatio (since Firefox 18, Chrome 31 and IE11, it has the same behaviour).

bitjoo avatar Jan 23 '14 22:01 bitjoo