Skip to content

Zoom gesture changes#434

Open
brentfpage wants to merge 2 commits intoespotek-org:masterfrom
brentfpage:zoom_gesture_changes
Open

Zoom gesture changes#434
brentfpage wants to merge 2 commits intoespotek-org:masterfrom
brentfpage:zoom_gesture_changes

Conversation

@brentfpage
Copy link
Copy Markdown
Contributor

@brentfpage brentfpage commented Mar 17, 2026

This PR changes the zoom gestures so that they're possibly more intuitive when a trackpad is used. Specifically, placing the cursor on the l.h.s. of the screen and swiping left moves the graph leftward below the edge, and similarly for the r.h.s as well as the top and the bottom. Placing the cursor in the middle 1/2 of the screen and swiping left/right zooms the screen out/in while keeping the data value of the exact center of the screen constant, and similarly for swiping down/up.
One drawback is that these new gestures no longer keep the x/y value hovered by the mouse constant during the zoom, which the current gestures do. Such behavior is especially appealing for pinch gestures on android, for which the effective mouse position is the center of the user's fingers. So, this PR includes preprocessor directives such that the PR has no effect on the android app.

@brentfpage brentfpage force-pushed the zoom_gesture_changes branch from 2b0f808 to 1f03f92 Compare March 21, 2026 23:46
…/time zoom rate from slowing down as the cursor position approaches the lhs of the screen
@brentfpage brentfpage force-pushed the zoom_gesture_changes branch from 1f03f92 to e21bf58 Compare March 21, 2026 23:57
@brentfpage brentfpage changed the title More intuitive zoom gestures Zoom gesture changes Mar 21, 2026
@brentfpage
Copy link
Copy Markdown
Contributor Author

I've soured on most of the changes originally tried in this PR, but I think the remaining ones are good. They
1.) prevent the rate of the X/time zoom from slowing as the cursor position approaches the lhs of the screen
2.) simplify the clamping of the X/time zoom to (min(delay) = 0s , max(window) = 10s).

@EspoTek
Copy link
Copy Markdown
Collaborator

EspoTek commented Mar 23, 2026

Semi-tangential, but now that you have write access to the repo are you able to make your branches under espotek-org/Labrador rather than your personal fork? That way it's easier for other maintainers to do things like run Actions on your branches.

@EspoTek
Copy link
Copy Markdown
Collaborator

EspoTek commented Mar 23, 2026

Also semi-tangentially related to this, but I realised that if you zoom in too far you can get "stuck" and can't zoom back out again. This also occurs in master!

@brentfpage
Copy link
Copy Markdown
Contributor Author

now that you have write access to the repo are you able to make your branches under espotek-org/Labrador rather than your personal fork? That way it's easier for other maintainers to do things like run Actions on your branches.

That makes sense – I'll do that in the future

Also semi-tangentially related to this, but I realised that if you zoom in too far you can get "stuck" and can't zoom back out again

The newest commit fixes this

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.

2 participants