Comments (8)
Hey myfonj, thanks for reporting. Several people already noted that. Yes, Dimensions is broken when in zoom-mode. I don't quite understand why people would want to measure things while zoomed in, but I'll look into it.
from dimensions.
@myfonj: just wondering, what would be the use case for measuring things when the zoom has been modified?
from dimensions.
tl;dr: modifying page zoom should be legitimate action that should not have
any negative consequences.
I agree that this might be just a border case and it may seem weird, but I
can give you my own userstory: I have my Chrome set so it's implicit "Page
zoom" is 110% to correct it's wonky tiny text display on my 10.1" display
with 1368×768 physical resolution even with 125% system zoom. I'm not
visually impaired, I just prefer larger texts.
I suspect Chrome does not obey system zoom or has some other issue. And I
suspect that the fact things become broken depending on seemingly innocent
setting (implicit page zoom), which developers should not worry about (ie
this extension should work regardless of the page zoom, because dimensions
that this extension measures are essentially virtual pixels, not physical
screen dimensions), is mark of some nasty flaw in current Chrome. This is
not the first quirk I spotted with this setting. Recently I've encountered
this in PrismJS/prism#336 .
Do you find this argument valid?
from dimensions.
@myfonj: I'm not the dev to say if it's a valid argument to include or take care of this use-case. Anyhow, IMHO when developing you don't really need to measure things with the zoom altered. I mean, it's fine to test and play with the zoom to see if everything work as expected, but if you're off by couple of pixels shouldn't be a big deal. Again, my opinion; I could be wrong... and usually I am. :P
from dimensions.
Okay so I found time to look deeper into this. Unfortunately Chrome only just now starts to implement the API's to detect zoom changes and get the zoom value (see Chrome Developer Docs). They will be available in Chrome version 38 which is not yet out.
If I implement it now I have to do a lot of if(chrome.version >= 38)
which I don't want to have in the code. Thus I'd postpone this some time until version 38 is out and has enough traction.
from dimensions.
@mrflix Any news since ?
from dimensions.
@mrflix well it is 2022 now, maybe this zoom thing can be fixed.
from dimensions.
@martinszeltins do you want to take a shot at coding a fix yourself?
from dimensions.
Related Issues (20)
- Sync Dimensions with DOM changes HOT 1
- measuring on a black area black doesn't work
- Crash after refresh HOT 1
- Refreshing when active HOT 3
- Keyboard Shortcut can't be set on Windows HOT 5
- `direction: rtl` makes dimensions not display properly HOT 2
- Can provide Firefox browser similar solutions? HOT 5
- Option to measure spacings between element boundaries instead of pixels HOT 3
- mousemove in device mode
- Esc to Disable Extension not working like other Chrome Extension
- Annoate measurements HOT 2
- Doesn't work on local sites? HOT 3
- [chrome] different icon color in dark mode
- Esc to stop measuring HOT 1
- Donations HOT 2
- [Brave] The Extension doesn't support the Browser Brave :( HOT 2
- Can't use on layout absolute
- Dimensions doesn't work in the iframe ( webchat )
- Does dimensions support integrate with figma? HOT 1
- Add threadshold option HOT 2
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 dimensions.