Double clicking a node will go to that page
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7f7cd71a17
commit
e69a5fa3fe
|
@ -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
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user