-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: trigger cluster update when new cluster tiles are loaded (DHIS2-8498) #70
Conversation
Hi Bjørn, I set up the branch locally and I'm still able to see the bug. It doesn't always happen, just sometimes. If i click a second time on the "zoom to content" button, then the extra clusters are removed. |
I've pushed a new fix. The issue is that we rely on the underlying tile handling of Mapbox GL JS, and these tiles are not always updated when the "moveend" event is fired. The new fix checks if the visible tiles of the map aligns with the current zoom level. If not it will wait until this is the case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, looks good when zooming in/out quickly and pressing the "Zoom to content" button. Approved with a few tiny comments 🚀
Looks all good to me, maybe @jenniferarnesen wants to retest and verify before merging though. 👍 |
## [1.0.15](v1.0.14...v1.0.15) (2020-03-24) ### Bug Fixes * trigger cluster update when new cluster tiles are loaded (DHIS2-8498) ([#70](#70)) ([4e7ec77](4e7ec77))
🎉 This PR is included in version 1.0.15 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes: https://jira.dhis2.org/browse/DHIS2-8498
When the app or user is quickly zooming the map, the cluster tiles are not yet ready to update. The result is that some clusters remains on the map. The issue is fixed by calling the onMoveEnd method every time a cluster tile is changed.
Screenshot showing the original issue:
Screen recording showing that the map is properly updated: