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

Scrolling the mouse wheel to zoom sometimes gets stuck going in only one directly #2485

Open
trampster opened this issue Feb 9, 2024 · 4 comments · Fixed by #2507
Open

Comments

@trampster
Copy link

Mapsui Version
4.1.2

Mapsui Platform
Avalonia, I haven't tested on any other platforms

Device
Linux (Ubuntu 20.04)

Describe the bug
When scrolling to zoom sometimes it gets stuck going in only one direction, for example both scrolling up and down with zoom out, or both scrolling up and down will zoom in.

It will also come right after a while of trying, with no obvious thing that you have done to fix it.

To Reproduce
Steps to reproduce the behavior:

  1. Launch an Avalonia app with a mapsui map (can be reproduced with the samples app)
  2. Scroll in and out until it starts going wrong (it can take a while to happen and it's not obvious what triggers it)

Expected behavior
Scrolling up always scrolls up and scrolling down always scrolls down

@pauldendulk
Copy link
Member

The word scrolling in a general context means going up or down, which would be a form of panning in Mapsui. But I assume that here you are talking about mouse wheel scrolling which would be zooming in and out in Mapsui (although because of the mouse position there is also some displacement of the map). Is that correct?

@trampster
Copy link
Author

Yes using the mouse wheel to zoom.

@trampster trampster changed the title Scrolling to zoom sometimes gets stuck going in only one directly Scrolling the mouse wheel to zoom sometimes gets stuck going in only one directly Feb 9, 2024
@pauldendulk
Copy link
Member

pauldendulk commented Feb 23, 2024

Mouse wheel zoom on Avalonia needs a workaround because the default step size (of a factor of 2) was too big because there are more touch event. This workaround may have introduced a bug. I am working on mouse wheel zoom to allow smaller step sizes so we could remove the workaround.

@pauldendulk
Copy link
Member

I can not reproduce this on Windows.

In 4.1.4 there will be an option to use an alternative mouse wheel method. You could try if that fixes the problem. Use: MapControl.UseContinuousMouseWheelZoom = true;

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 a pull request may close this issue.

2 participants