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

flyTo buggy when it happens offscreen (probably problem with request Animation frame?) #413

Open
montella1507 opened this issue Sep 12, 2024 · 0 comments

Comments

@montella1507
Copy link

montella1507 commented Sep 12, 2024

Hi,

please check attached video:

Screen.Recording.2024-09-12.at.16.31.31.mov

When flyTo happens when onscreen and "animation frames" are stable, everything is OK.
However, when flyTo happens outside the screen (for the instance - when tab is not visible), polygons and other things are not positioned correctly...

It looks like not all steps of the animation are "triggered", because not so many animation framews were triggered?
https://github.com/Leaflet/Leaflet/blob/main/src/map/Map.js#L356

Interesting fact is, panTo works without any issues.

When i log how many times the "animation function" is called it is like
14x when it works and only once when it does not.

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

No branches or pull requests

1 participant