-
-
Notifications
You must be signed in to change notification settings - Fork 945
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 #7004: Redraw linkgraph overlay correctly after zoom #7005
Conversation
Previously, when the user zooms in or out, the linkgraph overlay was recalculated before the zoom. This caused some stations and edges to be missing from the visible region of the viewport. Also used LINKGRAPH_DELAY when zooming, for consistency with scrolling and resizing.
ac83367
to
3d5cbbe
Compare
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.
I don't really follow how this would work. As far as I can tell the changes here would mean the overlay would be drawn less often, rather than more often.
I wonder whether the extra parameter is the correct solution anyway. In my mind, zooming/scrolling the viewport should not need to care about whether to redraw the overlay at all. Maybe it would be acceptable to just draw it in "all" cases and sacrifice a little bit of efficiency?
Thanks for reviewing my PR. At To fix, we need to somehow call The simplest solution (in my opinion) is to call However, in
Because the original code already had the short delay, I assumed that someone tried drawing it in all cases and realised that it was too slow. Actually, I wonder if the current |
Thanks for the detailed explanation
I'm sure you know that the simplest solutions are not always the best! This sounds good, and a cleaner way of doing things - try it and see how it turns out? If nothing else a comment can be added explaining why it's the way that it is :) |
Maybe I'll try this next week. |
Closed in favour of #7080 |
Or maybe not, needs more thought |
Previously, when the user zooms in or out, the linkgraph overlay was recalculated before the zoom. This caused some stations and edges to be missing from the visible region of the viewport.
Thanks for this enjoyable game!