Abdul Manan
Abdul Manan

Reputation: 2375

Add Edge without using Toolbar visJs

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

Upvotes: 1

Views: 1286

Answers (1)

TERMIN
TERMIN

Reputation: 862

just use:

network.addEdgeMode();

see this example in plunker:

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

Upvotes: 5

Related Questions