feat(toggle-pan): Add toggle to switch between "Scroll to Pan" and "Scroll to Zoom" #2017
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
To improve UX with trackpads.
Explanation:
The current trackpad behaviour does not feel natural. Usually when scrolling on a trackpad using 2 fingers, the page or content would Pan; whereas Zooming is achieved by pinching 2 fingers.
Considerations:
On a mouse, it is arguably more user-friendly to Scroll to Zoom. Therefore, I have added a toggle button to switch between behaviours.
I opted for the default behaviour to be Scroll to Pan because there are already various methods to control the zoom levels, and I believe that panning actions are more common than zooming. For context, the default Double-click behaviour is set to Zoom In; and there are the Zoom In & Out buttons on the toolbar to control the zoom levels. Open to discussion / change.
Changes:
3.6.1
from3.4.4
Screenshot:
New button