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

Regression: flyTo no longer works in react-leaflet@3+ #2465

Open
louh opened this issue Mar 5, 2023 · 0 comments
Open

Regression: flyTo no longer works in react-leaflet@3+ #2465

louh opened this issue Mar 5, 2023 · 0 comments
Labels

Comments

@louh
Copy link
Member

louh commented Mar 5, 2023

Here's an example of flyTo in action on react-leaflet@2.x:

Screen.Recording.2023-03-05.at.2.20.52.PM.mov
  • When panning somewhere outside the current viewport, there is a smooth animation (the animation is faster than map tiles can load, but it's still happening) to center the new location inside the viewport.
  • When clicking inside the current viewport, there is a smooth animation to center the clicked location in the viewport.

In react-leaflet@3+ (including @4) flyTo functionality appears to have been removed:

Screen.Recording.2023-03-05.at.2.22.08.PM.mov
  • When panning somewhere outside the current viewport, the viewport relocates only the minimum necessary to allow the popup to appear in the viewport.
  • When clicking in the current viewport, the viewport pans on the minimum distance necessary to allow the popup to appear in the viewport.
  • If clicking in the current viewport and the popup is already fully contained inside the viewport, no panning occurs.

This is not a critical breaking bug, but the effect is nice to have, particularly since the popup may be located in an awkward spot.

@louh louh added the bug label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant