-->

Add Edge without using Toolbar visJs

2019-08-01 16:01发布

问题:

Vis.js provides a toolbar to add node and edges by click button on toolbar.
I want to have a way so I can add edges on drag and drop nodes over each other.
I have searched but didn't find any practical example on how to create edges on clicking one node and drag over other to create edge between them without using toolbar they provided here.

Thanks

回答1:

just use:

network.addEdgeMode();

see this example in plunker:

https://plnkr.co/edit/bYweWazPIPgG8smhrNAw?p=preview