diff --git a/templates/graph.html b/templates/graph.html index cbd363c..0fbaadc 100644 --- a/templates/graph.html +++ b/templates/graph.html @@ -40,7 +40,12 @@ var network = new vis.Network(container, data, options); network.on('doubleClick', function (props) { console.log(props) - // window.location.href = '/edit/'+props.items[0] + if (props.nodes.length) { + let nodeId = props.nodes[0] + let node = nodes.get(nodeId) + console.log(node) + window.location.href = '/edit/'+node.label + } })