increase thickness of line between interface and announce if it's 1 hop away

This commit is contained in:
liamcottle 2024-08-13 11:35:16 +12:00
parent ca88c252f4
commit f3f60684ec

View file

@ -239,15 +239,30 @@ export default {
}
const edge = {
from: entry.interface,
to: entry.hash,
color: "gray",
};
// if announce is 1 hop away, they are directly running on the interface they announced from
// for example, they might be a nomadnetwork node, that is hosting a TCPServerInterface
// in this case, its lxmf.delivery and nomadnetwork.node addresses would be 1 hop away
if(entry.hops === 1){
// make the line between the interface and the announce thicker
edge.background = {
enabled: true,
color: "gray",
};
}
// add node
nodes.push(node);
// add edge from interface to announced aspect
edges.push({
from: entry.interface,
to: entry.hash,
color: "gray",
});
edges.push(edge);
}