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

Zoom flickering #147

Open
joewdavies opened this issue Jan 8, 2025 · 0 comments
Open

Zoom flickering #147

joewdavies opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@joewdavies
Copy link
Collaborator

When zooming in quickly, there appears to be some zoom flickering (switching back and forth between zoom-levels)

I believe this is due to the fact that some redraw events may take longer than others (due to data fetching), meaning that when zooming in we can encounter a case where a 'lower' zoom level is drawn after a 'higher' zoom level which creates this flickering back and forth effect.

A solution to this might be something like:

Use a zoom-level tracking mechanism to associate each getData call with the current zoom level. Before processing the data or proceeding with further operations, check if the zoom level matches the most recent one. If not, ignore the outdated data.

@joewdavies joewdavies added the bug Something isn't working label Jan 8, 2025
@joewdavies joewdavies self-assigned this Jan 8, 2025
joewdavies added a commit that referenced this issue Jan 8, 2025
…dGrid in order to cancel ongoing requests when zoom level changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant