question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make scrollZoom speed configurable

See original GitHub issue

I find scrollZoom speed painfully slow. Making this configurable may mean propagating a scale factor to some other gl modules or something, but then again it might just be a simple scalar. Maybe scrollZoomSpeed?

(Side note: it’s not clear to me why scrollZoom is camelCased and belongs to config instead of to layout.)

I don’t think it’s entirely straightforward to get the speed itself just right across browsers and system configs, but maybe this is something: http://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers#answer-30134826

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mzechmeistercommented, Jul 1, 2019

As a quick hack one can adjust manually the hardcoded normalisation factor in plotly.min.js:

var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,i=Math.exp(-Math.min(Math.max(r,-20),20)/200),...

I replaced /200 by /10.

1reaction
danielfrunzacommented, Apr 1, 2021

If using in Javascript, I solved this by overtaking the wheel event (capture phase) and emitted my own event with modified deltaY. This works on cartesian plots, I did not check others.

function handler(event)
{
      if (!event.isTrusted) return;
      event.stopPropagation();
      var newEv = new WheelEvent('wheel', {
        clientX: event.clientX,
        clientY:event.clientY, 
        deltaY:event.deltaY*2,
      });
      event.target.dispatchEvent(newEv);
}

What is the element that you attached the ‘handler’? I tried on ‘document’ and plot element and does not work…

Read more comments on GitHub >

github_iconTop 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 >
How to Customize Mouse Sensitivity, Scroll Speed, and More ...
Click on the Wheel tab to change Horizontal Scrolling and Vertical Scrolling settings. Once you've customized the mouse settings, click on Apply ...
Read more >
How to change scroll speed for more precision zooming in ...
The current scrolling speed is way too fast to get any type of precision using the mouse scroll wheel for zooming in.
Read more >
Zoom speed with scroll wheel - Unity Forum
Zoom speed with scroll wheel · Hold Alt + Right Mouse button and move the mouse. · Use "flythrough mode". Hold right click...
Read more >
How to change Mouse Scroll Speed in Windows 10 - YouTube
In Windows 10, the default scroll value for the Mouse wheel is ... scrolling to make things easier for you, it should be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found