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

[FEATURE] Adjust fling animation (spring) physics for fast & small drag gestures #1768

Open
Tracked by #1529
erikschul opened this issue Dec 10, 2023 · 3 comments
Open
Tracked by #1529
Labels
feature This issue requests a new feature P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Milestone

Comments

@erikschul
Copy link

What is the bug?

On web, when using mousedown-drag-mouseup to move the map, even a small distance (e.g. 20px) causes the map to move a far distance (e.g. 1 full window width).

Expected behavior (industry standard) is much less acceleration.
See Google Maps, Bing Maps, and Apple Maps.

How can we reproduce it?

Do you have a potential solution?

No response

Platforms

web

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

@erikschul erikschul added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Dec 10, 2023
@josxha
Copy link
Contributor

josxha commented Dec 10, 2023

On web, when using mousedown-drag-mouseup to move the map, even a small distance (e.g. 20px) causes the map to move a far distance (e.g. 1 full window width).

Can't reproduce the described problem. See my video below.
Please provide information about

  • the browser you are using
  • the operating system
  • the specific version of flutter_map you are using

How can we reproduce it?

This input field has a reason. Please let us know

  • if you are using the demo app
  • if you use your own implementation. If yes, provide us with a minimal example of your FlutterMap widget.
Aufzeichnung.2023-12-10.113445.mp4

@josxha josxha self-assigned this Dec 10, 2023
@JaffaKetchup JaffaKetchup added the S: core Scoped to the core flutter_map functionality label Dec 10, 2023
@erikschul
Copy link
Author

erikschul commented Dec 11, 2023

Thanks @josxha
I have added a video:
https://youtu.be/dpOsD97LxMk

flutter_map: small drag causes large position changes, up to a whole screen width (small fling causes high velocity)
google maps: small drag causes small position change (small fling causes low velocity)

By the way, I vaguely remember Maplibre Native (for Flutter) had similar issues with getting "natural" (industry average) drag behavior (but that was for touch drag, not mouse pointer, but probably the same), but that it was fixed 3-6 months ago (in development branch). I haven't tested their code since, it's only now that I'm getting back into using a map widget.

My position is that it's easy to gain Flutter adoption if users are not surprised by the behavior of widgets. Users expect what they're used to, e.g. that of native Apple/Google Maps, so that is my reference for "expected behavior".

@josxha
Copy link
Contributor

josxha commented Dec 11, 2023

Thanks a lot for the additional information and video. I added it to #1733.

If you dont mind I'll ping you when the changes are implemented so that you can test it?

@josxha josxha added this to the v7.0 milestone Dec 11, 2023
@josxha josxha removed waiting for user response needs triage This new bug report needs reproducing and prioritizing labels Dec 11, 2023
@josxha josxha changed the title [BUG] Map drag behavior is heavily accelerated compared to industry standard [BUG] Fling animation is unnatural after quick short drag gestures Dec 14, 2023
@JaffaKetchup JaffaKetchup added P: 3 (low) (Default priority for feature requests) and removed P: 2 (soon™?) labels Aug 8, 2024
@JaffaKetchup JaffaKetchup changed the title [BUG] Fling animation is unnatural after quick short drag gestures [FEATURE] Adjust fling animation (spring) physics for fast & small drag gestures Aug 8, 2024
@JaffaKetchup JaffaKetchup added feature This issue requests a new feature and removed bug This issue reports broken functionality or another error labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue requests a new feature P: 3 (low) (Default priority for feature requests) S: core Scoped to the core flutter_map functionality
Projects
Status: To do
Development

No branches or pull requests

3 participants