How do I get the name of a clicked node in cytoscape.js ?
When adding a new edge How Do I specify the source( clicked node Currently) and destination node ?
In all the example what I see the adding nodes, deleting nodes, adding edges are related to static content (hardcoded), I want the code to dynamically create a node, delete a node, create an edge.......as belo
================================
vis.addContextMenuItem("Add Edge", "nodes",
function (evt) {
var data = { id: "n5",
source: "1",
target: "n4",
directed: false };
var edge = vis.addEdge(data, true);
}
);
================================
Please solve my doubts.