-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improve Widgets calculations sync with tiles #223
Improve Widgets calculations sync with tiles #223
Conversation
This pull request has been linked to Shortcut Story #148156: Widgets calculations not synced with tiles. |
Pull Request Test Coverage Report for Build 1468274395
💛 - Coveralls |
@Clebal CR looks fine to me. I would like to test it locally, and then see if we can prepare a patch. |
@VictorVelarde sure. I'll do it ASAP. |
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.
Looks well. I like the approach
Story details: https://app.shortcut.com/cartoteam/story/148156
Approach:
I store in a ref the timeoutId of the debounced function. Everytime that an update in tiles or viewport can happens, the debounce is cleared.
Using fetch, we know that a tile is being fetched. Knowing that, we can stop the debounce because we know in advance that in a few seconds a tile will be loaded, avoiding unnecessary calculations.