howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
423 stars 95 forks source link

Incorrect calculation of COMMENTPOS #259

Open amshikov opened 3 years ago

amshikov commented 3 years ago

Hello!

There is an issue with calculation of COMMENTPOS. It'd better illustrated by exampe config:

regular NODEs:

NODE gw0.od <------>LABEL gw0.od <------>ICON 180 180 images/router-blue.png <------>POSITION 500 140

NODE sw1-bug.od <------>LABEL sw1-bug.od <------>ICON 180 180 images/core-switch-blue.png <------>POSITION 500 550

NODE gw0.od-2 <------>LABEL gw0.od-2 <------>ICON 180 180 images/router-blue.png <------>POSITION 800 140

NODE sw1-bug.od-2 <------>LABEL sw1-bug.od-2 <------>ICON 180 180 images/core-switch-blue.png <------>POSITION 800 550

regular LINKs:

LINK gw0.od-sw0.od-1 <------>BWLABELPOS 62 38 <------>COMMENTPOS 87 7 <------>INCOMMENT xe-4/0/0 <------>OUTCOMMENT 5 <------>NODES sw1-bug.od:-83:-85 gw0.od:-83:0

LINK gw0.od-sw0.od-2 <------>BWLABELPOS 62 38 <------>COMMENTPOS 85 7 <------>INCOMMENT xe-4/0/0 <------>OUTCOMMENT 5 <------>NODES sw1-bug.od-2:-83:-85 gw0.od-2:-83:0

Compare 87 and 85 in COMMENTPOS in both links. The expected result is that INCOMMENT in second link should be closer to the center of a link, but actually it is suddenly shifted to the end of link. Screenshot: https://i.imgur.com/abBu1gk.png