Add Edge without using Toolbar visJs

跟風遠走 提交于 2019-12-11 09:44:26

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!