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

Cancel animations on map controller move events #1043

Merged
merged 5 commits into from
Feb 1, 2022

Conversation

Robbendebiene
Copy link
Contributor

This fixes #946

Fling and double tap animations are already cancelled in multiple scenarios (like panning the map). This PR also cancels the animations whenever the MapController moves the camera. This is done to prevent interferences with animated camera moves.

@kengu
Copy link
Contributor

kengu commented Oct 7, 2021

@Robbendebiene - Can you fix the analyze issue?

@Robbendebiene
Copy link
Contributor Author

@kengu Sorry, I've missed that. Now everything should be correctly formatted and annotated.

@Robbendebiene
Copy link
Contributor Author

Can someone please review this?

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 18, 2021
@Robbendebiene
Copy link
Contributor Author

I still like to land this PR.

@github-actions github-actions bot removed the Stale label Nov 19, 2021
@b3nni97
Copy link

b3nni97 commented Nov 25, 2021

Can someone review this?

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 26, 2021
@Robbendebiene
Copy link
Contributor Author

@johnpryan or @kengu can you please review this.

@github-actions github-actions bot removed the Stale label Dec 27, 2021
@b3nni97
Copy link

b3nni97 commented Jan 4, 2022

Is this repository abandoned?

@ibrierley
Copy link
Collaborator

Sorry about all of the delay, there's a bit more action now. There's been some changes since, but if you can pull upstream when possible, then we'll see if we can get it tested and merged!

@JaffaKetchup
Copy link
Member

@b3nni97 No! There have been some developments recently after a quiet period, hopefully it doesn't happen again.

@Robbendebiene
Copy link
Contributor Author

@ibrierley and @JaffaKetchup I've just pulled upstream.

@JaffaKetchup
Copy link
Member

Ok, thanks. Just needs to be reviewed before merge. I can't check it over for another 8 hours or so (I'm currently on mobile), but maybe another maintainer can!

Copy link
Collaborator

@ibrierley ibrierley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing seems good. I note on the mapController page it now takes you to the correct location if mid fling and a different location selected, so happy with that.Thanks!

@ibrierley
Copy link
Collaborator

Happy to merge this, but not sure if you wanted to do any testing first @JaffaKetchup

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Feb 1, 2022

No it's ok, I trust your judgement. Please do merge! (If possible, use a Squash and Merge, but it doesn't matter too much)

@ibrierley ibrierley merged commit 42fa4b5 into fleaflet:master Feb 1, 2022
@ibrierley
Copy link
Collaborator

Ah sorry missed your last comment.

@JaffaKetchup
Copy link
Member

Nah no problem! It was only 2 commits anyway. I just prefer squashing for PRs with lots of commits: it keeps the main branch tidy.

@ibrierley
Copy link
Collaborator

Yep, makes sense.

@alanlanglois
Copy link

alanlanglois commented May 9, 2022

I made a custom move animation to center the map on current location when pressing a button.
When I pan and click the recenter button while the kinetic Pan animation is not finished, the recenter animation play as it should, but when finished it flick to what I guess is the end of the kinetic animation.
demo

Is there a way to force stop the pan animation via the mapController or else?

@ibrierley
Copy link
Collaborator

are you using the latest version from Git (not the one from pub.dev ?)

@alanlanglois
Copy link

@ibrierley I'm using the one on pub.dev ( flutter_map: ^0.14.0 )

@ibrierley
Copy link
Collaborator

Ok, it may be worth trying the Git version for you then. I think that may have been fixed, but there could be circumstances where it isn't still (or I'm remembering wrong!).

@alanlanglois
Copy link

@ibrierley need to do more intensive tests, but looks like it fixies the bug!
When do you plan to land the next version including this fix?

@ibrierley
Copy link
Collaborator

ibrierley commented May 10, 2022 via email

@JaffaKetchup
Copy link
Member

Please see #1188 for more information about publishing to pub.dev. As @ibrierley said, there is currently no estimate.

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.

Fling animation prevents MapController.move
6 participants