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

Invalidate map size after updating telemetry table #933

Merged

Conversation

argilo
Copy link
Contributor

@argilo argilo commented Nov 9, 2024

The updateTelemetryTable function can change the size of the telemetry table, which in turn changes the size of the map. (This occurs on startup when the table footer is hidden, and again whenever any new sondes appear.) But the function doesn't call mymap.invalidateSize(), which leaves the map incorrectly centered, at least on Firefox. (If the browser window is resized, then the map snaps back into place.)

Here I've added mymap.invalidateSize() to the end of the function. Although updateTelemetryTable is called frequently (at least once per second) I expect that this shouldn't cause performance problems because invalidateSize returns quickly if the map has not in fact changed size.

@darksidelemm darksidelemm merged commit 6bd31a4 into projecthorus:testing Nov 9, 2024
6 checks passed
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.

2 participants