-
Notifications
You must be signed in to change notification settings - Fork 1
Description
-
Each peer must have a peerName
-
Each peer must have a label
-
peerName is either set by the user, or if not set by the user it's set to peer.ip_hash. If peer.ip_hash is not set, set peerName to "Unknown IP"
-
label is the peerName, or if its a gateway "GW"
in app.js change
const peerName = peer.ip_hash ? state.peerNames[peer.ip_hash] : null;
to
var peerName = 'Unknown IP'
if(peer.ip_hash) peerName = #${peer.ip_hash}
if(peer.ip_hash && state.peerNames[peer.ip_hash]) peerName = state.peerNames[peer.ip_hash];
if (isGateway) peerName = 'GW'
change
const labelContent = d.label || (showInsideLabels ? (d.peerName || #${d.peer.ip_hash || d.id.substring(5, 11)}) : null);
to
const labelContent = d.label || (showInsideLabels ? (d.peerName || #${d.peer.ip_hash || d.id.substring(5, 11)}) : 'Unknown');
Since the default is to show no labels the label collision can be much more loose.
change
const MIN_LABEL_ANGLE_GAP = 0.08; // ~29 degrees between labels
const MAX_LABELS = 12;
to
const MIN_LABEL_ANGLE_GAP = 0.008;
const MAX_LABELS = 120;
Metadata
Metadata
Assignees
Labels
Type
Projects
Status