Skip to content

Conversation

psychedelicious
Copy link
Collaborator

Reverts #8043

I only tested this after merging. Unfortunately it breaks the canvas scaling for some input devices. How broken it is depends on magnitude and frequency of the input device's scroll events.

As implemented in the PR, once the scale has snapped, you have to scroll more than the threshold in a single scroll event to "break" the snap.

This interacts badly with certain input devices. For example, on a macOS touchpad, individual scroll events are very frequent with a small magnitude. It takes a really strong scroll for a single scroll event delta to be greater than the threshold.

So if you scroll hard enough to break the snap, it almost instantly jumps to the next snap point, thanks to the inertial nature of macOS touchpad gestures. Even without the inertial touch stuff, on some input devices you would need to be very agile and quick to not accidentally scroll directly from one snap point to the next.

One way to implement the snap behaviour might be to handle scrolling while snapped and not snapped differently:

  • Track whether or not we are snapped.
  • When scrolling, if un-snapped, scale until we snap. Current behaviour.
  • When scrolling, if snapped, do not scale. Instead, track the cumulative distance scrolled. Once that reaches a snap break threshold, scale to just past the snap point and fall back to un-snapped scroll handling.

@psychedelicious psychedelicious enabled auto-merge (rebase) May 27, 2025 01:35
auto-merge was automatically disabled May 27, 2025 01:35

Pull request was closed

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