Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: CircleLayer not updating on pan #1735

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Conversation

Robbendebiene
Copy link
Contributor

@Robbendebiene Robbendebiene commented Nov 23, 2023

Since version 6.0.1 the circle layer is not updated properly any more.

This was introduced as a side effect of: 117f254#diff-5d1e8506fe899e135910abbab2ef61ca6b4fde4e34f60b80b0fd85204ae485baL40-L47

Before After
before.webm
after.webm

This can also be tested using the example app's circle layer page by adding an AnimatedSwitcher around the CircleLayer.

AnimatedSwitcher(
  duration: Duration(milliseconds: 300),
  child: CircleLayer(circles: circleMarkers),
),

While looking at it the circle layer could certainly get some more love (like caching the grouped circles), but I currently don't have time for any additional optimizations.

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

@josxha josxha left a comment

Choose a reason for hiding this comment

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

Thanks for your pull request. I can reproduce this issue with the as described by wrapping the CircleLayer with an AnimatedSwitcher. It doesn't occur when using the CircleLayer directly.
I did a performance test to see how much time the check takes and it seems to have no noticable penatly.

Aufzeichnung.2023-11-23.141027.mp4

The PR looks good to me, however I'd like to have another code review before we can merge.

@josxha josxha removed the needs triage This new bug report needs reproducing and prioritizing label Nov 23, 2023
Copy link
Contributor

@TesteurManiak TesteurManiak left a comment

Choose a reason for hiding this comment

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

LGTM too!

@josxha josxha changed the title Fix circle layer not updating on pan fix: circle layer not updating on pan Nov 23, 2023
@josxha josxha changed the title fix: circle layer not updating on pan fix: CircleLayer not updating on pan Nov 23, 2023
@josxha josxha merged commit 2ba0c99 into fleaflet:master Nov 23, 2023
josxha pushed a commit to josxha/flutter_map that referenced this pull request Nov 28, 2023
* Fix circle layer not updating on pan

* Format code
josxha pushed a commit that referenced this pull request Nov 28, 2023
* Fix circle layer not updating on pan

* Format code
@josxha josxha added this to the v6.1 milestone Dec 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug This issue reports broken functionality or another error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants