Browse Source

fix selection

master
Milan Pässler 2 months ago
parent
commit
7594159ac8
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      client/src/index.js

+ 4
- 2
client/src/index.js View File

@@ -82,7 +82,7 @@ const go = async (name, selected) => {
if (!selected) {
setSelectedNode(nodesAsArray().sort((a, b) => b.weight - a.weight)[0]);
} else {
setSelectedNode(nodesAsArray().filter(node => node.id === selected)[0]);
setSelectedNode(newGraph.nodes[selected]);
}
updateGraph();
updateDetails();
@@ -93,7 +93,9 @@ const updateDetails = () => {

details.innerHTML = `
${selectedNode ? `
AS${selectedNode.as_number}
<p></p>
<p>AS${selectedNode.as_number}</p>
<p>${selectedNode.owner}</p>
` : ``}
`;
};

Loading…
Cancel
Save