Reputation: 13
function addEdgeMode(nodeId){
network.addEdgeMode();
}
/**need method like network.addEdgeMode(); to delete node example: network.deleteNodeMode()*/
Upvotes: 1
Views: 1600
Reputation: 16341
Im not too familiar with vis but according to the offical vis.js docs, I think you can use the deleteSelected() method like this:
function deleteEdgeMode(nodeId){
network.deleteSelected();
}
Also, according to the method description, do note that you do not need to go into editEdge mode or enable manipulation for the deleteSelected()
method to work.
Upvotes: 2