Limit mouse wheel scroll speed
See original GitHub issueIs it possible to limit or throttle how fast the scroll wheel scroll is able to move? If I flick my scroll wheel, it scrolls as fast is my mouse emits events. I would like to limit it at a maximum speed, similar to how you can clamp the speed on the mouseEdges plugin.
Here is my current viewport configuration:
const viewport = new Viewport({
interaction: app.renderer.plugins.interaction,
disableOnContextMenu: true,
});
viewport.drag({ mouseButtons: 'right' });
viewport.decelerate({ friction: 0.975 });
viewport.mouseEdges({ distance: 5, speed: 12, decelerate: false });
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to change Mouse Scroll Speed in Windows 11/10
Change Mouse Scroll Speed in Windows 11 · Open Settings · Open Bluetooth and Device settings · Click on Additional mouse settings ·...
Read more >Mouse Scroll Too Slow or Fast? How to Fix It in Windows 10
Click Additional mouse options. · Click the Wheel tab. · In the Horizontal Scrolling section, enter your desired scroll rate. · Click OK....
Read more >Change Mouse Scroll Speed in Windows 10 - Winaero
Open the Settings app. · Go to Devices -> Mouse. · On the right, select Multiple lines at a time under Roll the...
Read more >How to Configure Mouse Wheel Speed Across Browsers ...
The mouse wheel's scrolling speed varies with the choice of the web browser, even the DOM events and methods to change the scrolling...
Read more >Can I change the scroll speed using css or jQuery?
In the example below, I would like to reduce the scroll speed of the div's content, especially when using the mouse wheel, as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, I understand. I’m not sure it makes sense as an option on the drag plugin, however.
The fastest way to do this is to create a user plugin based on drag() and change the wheel function. In that function you want to track speed (number of turns / second) and if it’s greater than a maximum speed setting, then don’t perform the scroll. Let me know if you have any questions about implementation.
Because I am attaching a network event to scrolling. I am building a UI similar to google maps (except the mouse wheel scrolls instead of zooms). As you pan around I download new data, so I wanted to limit the speed you can move at.
TBH not sure how annoying it will feel… was hoping to implement something to see 😄