Open mordae opened 1 year ago
I have a similar problem with Windows 11 and Chrome 108.0.5359.125 This appears to be caused by the system's scale setting (in case of Windows, it is found in "System > Display > Scale"). With high resolution displays, Windows suggests a scale setting other than 100%, which also seems to affect the mouse wheel.
A super-quick search yielded this page: https://stackoverflow.com/questions/1713771/how-to-detect-page-zoom-level-in-all-modern-browsers I tested the window.devicePixelRatio property both on Chrome and Edge, and in both cases it reports the correct scaling factor of 2.5 for my computer, which matches the 250% factor that is set in the Windows' settings.
So maybe it is enough to divide the MouseWheelEvent's delta value by this factor to fix the issue? But then the browser's zoom level would also affect the result...
@pfalstad That's MUCH better now. Thank you! 👍
Although, the issue has not gone away completely, at least for me. For example, if I start with a 3k3 resistor and I scroll slowly to increase the value, some values are still being skipped, namely 5k6, 12k, 27k, 56k, 220k, 470k... This is still with the default 250% scale factor of my computer.
For me (Fedora Linux, Firefox, 4K screen with 200% scaling, no browser zoom) it now takes 6 scroll steps to switch to the next value.
It takes 2 for me. I will probably need to make it configurable to make everyone happy.
I see Firefox on Mac takes many more scroll steps to switch.
(First of all, thanks for an awesome tool!)
When running on Fedora 36 with
chrome-sandbox
, component scroll skips every other value. This is with2022-08-21
release from https://falstad.com/circuit/offline/.Steps to reproduce: