Add Edge without using Toolbar visJs
Asked Answered
A

1

1

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

Audrey answered 2/1, 2018 at 13:16 Comment(0)
T
5

just use:

network.addEdgeMode();

see this example in plunker:

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

Torrence answered 3/1, 2018 at 9:39 Comment(2)
is there any way to avoid "mousedown", having control on the event when to release the dragging edge?Chrominance
How can i delete and edit edge in vis js networkPerdita

© 2022 - 2024 — McMap. All rights reserved.