Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The size is way off for me. Tried on my Mac Book Pro's 15" screen and the batteries are huge, a good 50% bigger than real life. I'd imagine you would need to get screen size and DPI to accurately resize the images. Perhaps you could have a sample image (like the AA batteries) along with a slider to allow the user to set the exact ratio.


Perhaps you've disabled your screen resolution tracking (screen.width / screen.height).

To calculate the DPI it uses the screen resolution (pixels) and your reported screen size (inches), if either is missing it would fail to work (for now).


Safari might not report it, because I haven't changed anything (I wouldn't even know where to change that in Safari). I checked in FireFox and it was much closer to reality.

Update: Safari does report it, so it looks to be another issue. Perhaps a bug in the scaling for Safari?


Yes, perhaps it is a bug in Safari. Thanks for the report.

Edit - It might be the way Safari handles onload - https://bugs.webkit.org/show_bug.cgi?id=13241




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: