Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix #7004: Redraw linkgraph overlay correctly after zoom #7005
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.
LordAro left a comment
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.
To fix, we need to somehow call
The simplest solution (in my opinion) is to call
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 :)