diff --git a/docs/automation-graph.html b/docs/automation-graph.html
index 016b6394..e540705c 100644
--- a/docs/automation-graph.html
+++ b/docs/automation-graph.html
@@ -1321,10 +1321,16 @@ function showEdgeLegend(edgeId) {
network.on('click', params => {
if (params.nodes.length === 1) {
- showNodeLegend(params.nodes[0]);
+ const id = params.nodes[0];
+ HIGHLIGHT.setSelectedNode(id);
+ HIGHLIGHT.applyHighlight();
+ // Right panel still shows details of the clicked node (last-clicked, even after toggle-off)
+ showNodeLegend(id);
} 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.applyHighlight();
document.getElementById('legend-panel').classList.remove('visible');
}
});