vis-network
vis-network copied to clipboard
Handle both mouse wheel and trackpad
The current code ignores magnitude differences in deltaY, resulting in an experience that is either too fast on trackpad or too slow with a mousewheel.
This change allows those to differ within a clamped range, so that one zoomSpeed value works well for both input devices.
Fixes #1882
Looking forward to this improvement!
@Thomaash could you take a look at this PR? Having a fix for this would let us remove a very clunky workaround in our app where we have to give the user a setting to tell us which input device they're using.