network-weathermap icon indicating copy to clipboard operation
network-weathermap copied to clipboard

Link BW labels should attempt automatic slight repositioning

Open nrm21 opened this issue 9 years ago • 2 comments

Bandwidth links can already be re-positioned from the default (75% 25% for IN OUT) so they aren't sitting on top of each other. However on crowded maps doing this manually can be very tedious. Maps can be made bigger as well but re-spacing all the nodes out is only slightly less tedious. Also using template to move all links doesn't usually solve the issue it just changes the position where all the overlaps occur slightly.

It would be nice if there was an algorithm to detect if links are/will display on top of each other and if possible try to slightly maneuver themselves in whatever direction along the graph as little as possible to not be on top of each other. This way users won't have to use the BWLABELPOS a custom amount repeated a bazillion times for every different link.

Algo might be something like: A) detect label overlap and attempt move up/down along link in direction that would make less overlap B) attempt also to not overlap node icons but this is preferable to overlap of labels if unavoidable C) detect if truetype font in use and rotate label/text as necessary to create more room (last priority)

Just some ideas.

nrm21 avatar Oct 31 '16 18:10 nrm21

It would have to be per-run of the map, because the size of the boxes changes with the value... it would be useful though!

howardjones avatar Oct 31 '16 18:10 howardjones

Hmm maybe. Its just the width of the label that changes due to text right? And only by so many pixels right?

Maybe the algo could take that into account when calc'ing. Not having to run it each time the map redraws would prob help cut down on lots of unnecessary CPU for those redrawing often.

nrm21 avatar Nov 01 '16 02:11 nrm21