You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having zoom enabled, I can use the left mouse button to drag a box around the area of interest and get a zoomed in version of my graph.
However, when I'm doing the exact same action with not the left mouse button held down, but the right mouse button held down there should not be any zoom applied. The current behaviour is, that I drag with the right mouse button held down, no box is drawn, but if I release the right mouse button there is zoom applied showing data within a distance of two units around the initially right-clicked point.
This produces unwanted behavior for my project as well and there doesn't seem to be any simple way to disable right mouse button interactions altogether
A bit late, but I managed to fix this with a workaround for me.
boxRef is added on a wrapper of the graph, in my case a Box element from MUI that wraps the Plotly Graph
With this on right click drag does nothing, you can also add "click" event listener to further disable right click only (not drag)
The event on right click drag is blocked (stopped propagation) so that plotly internally doesn't fire the event.
gvwilson
changed the title
Bug: Zoom behaviour when dragging with right mouse button held down
zoom behaves incorrectly when dragging with right mouse button held down
Aug 9, 2024
When having zoom enabled, I can use the left mouse button to drag a box around the area of interest and get a zoomed in version of my graph.
However, when I'm doing the exact same action with not the left mouse button held down, but the right mouse button held down there should not be any zoom applied. The current behaviour is, that I drag with the right mouse button held down, no box is drawn, but if I release the right mouse button there is zoom applied showing data within a distance of two units around the initially right-clicked point.
It is reproducible in this stackblitz.
Please feel free to ask, if you need any other details.
The text was updated successfully, but these errors were encountered: