Closed SeXyTeA-x closed 10 months ago
Hmm... The neovis api doesn't have it, you jave 2 options, hook the network object normal double click api and check which node/rel was clicked, second options is to add it to neovis and open PR which is always welcome 😄
emmm,do you mean to use this?
viz.network.addEventListener('dblclick', function(event) { console.log(event) });
But the code is wrong
Yes, but make sure that's it runs after the render completes
Here's how I use it:
viz.registerOnEvent('completed', (e) => {
console.log(viz.network);
viz.network.addEventListener('dblclick', function() {
console.log(1)
});
});
But console.log(1) is not triggered when I double-click
https://visjs.github.io/vis-network/docs/network/#Events The event is named doubleClick
Oh, I didn't pay attention. Thank you for your patience
No problem 😄
I want to implement the function of double-clicking the node, but I find that the api document seems to provide only the event of clicking the node, may I ask whether there is a double-clicking node event in neovis.js