fix(graph): use setSelectedNode API instead of direct state mutation (code review)
This commit is contained in:
@@ -1329,7 +1329,7 @@ network.on('click', params => {
|
||||
} else if (params.edges.length === 1) {
|
||||
showEdgeLegend(params.edges[0]);
|
||||
} else if (params.nodes.length === 0 && params.edges.length === 0) {
|
||||
HIGHLIGHT.state.selectedNode = null;
|
||||
HIGHLIGHT.setSelectedNode(null);
|
||||
HIGHLIGHT.applyHighlight();
|
||||
document.getElementById('legend-panel').classList.remove('visible');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user