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

Implement panning with touchpad and/or scroll-wheel #221

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

emilk
Copy link
Contributor

@emilk emilk commented Nov 4, 2024

  • Map is displaying and reacting to input correctly, both natively and on the web.
  • CHANGELOG.md was updated with relevant information (or the change was purely internal).
  • Closes Can't pan with 2D scroll #210

@abey79
Copy link
Contributor

abey79 commented Nov 4, 2024

@podusowski it would be great if you could push a release after this one 🙏🏻

@podusowski podusowski merged commit 8ad83c8 into podusowski:main Nov 5, 2024
1 check passed
@podusowski
Copy link
Owner

0.28.0 is live.

@ForsakenHarmony
Copy link

I don't understand this change, why should the scroll-wheel pan?
IMO it should zoom by default like every other map, the mouse wheel panning is very confusing right now

@podusowski
Copy link
Owner

I think this arrangement comes from egui / winit stack. Zoom event exists too, through on native platforms and web it is triggered by ctrl-wheel. On Android, where I mainly use Walkers, it works by two-finger zoom gesture as expected, so I haven't put much thought on this. I suppose we could make it configurable.

@emilk
Copy link
Contributor Author

emilk commented Nov 8, 2024

I would love it if scrolling on a mouse would zoom, and two-finger-pan on a touch-pad would pan. Unfortunately they produce the same "Scroll" event, so it is difficult to distinguish what is what. There is a similar discussion here:

I'm sure there is some way to accomplish it, but will likely require some plumbing in egui. PRs welcome :)

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.

Can't pan with 2D scroll
4 participants