Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll can pan or zoom : useful for touchpad #555

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dvad
Copy link

@Dvad Dvad commented Feb 22, 2024

First of all, thank you for writing this wonderful library!

I would like to propose this changes about the behavior of scrolling on plot.

Before, scrolling was exclusively for zooming.
But on modern touchpad (e.g. macbook) mouse wheel event is sometime a 2 dimensional vector (vertical and horinzonal) and hence can be use for more fine grained control.

This implements optional panning and zooming with the mouse wheel in a satisfying way for such touchpad. This adds a few options controlling:

  • if the mouse wheel panning or zooming by default
  • the modifier key toggling between the two behavior (none for behavior non togglable)
  • the rate of panning and zooming
  • if both axis should be controlled together with the vertical axis or separated with the horizontal and vertical component.

In particular, the default behavior does not change.

Would such a change makes sense in your opinion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant