问题
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
来源:https://stackoverflow.com/questions/48061747/add-edge-without-using-toolbar-visjs