Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rawData2.links.forEach(function (link, idx) {
edges2.push(
new Edge()
.sourceVertex(vertices2[link.source])
.targetVertex(vertices2[link.target])
.sourceMarker("circle")
.targetMarker("arrow")
.text("")
.weight(50)
);
}, graph2);
rawData.links.forEach(function (link, idx) {
edges.push(
new Edge()
.sourceVertex(vertices[link.source])
.targetVertex(vertices[link.target])
.sourceMarker("circle")
.targetMarker("arrow")
.text("")
.weight(link.value)
)
;
});
rawData.links.forEach(function (link) {
graphData.edges.push(new Edge().sourceVertex(graphData.vertices[link.source]).targetVertex(graphData.vertices[link.target]).weight(link.value));
}, graph);
viz.getInputVisualizations().forEach(inViz => {
edges.push(new Edge()
.sourceVertex(inViz.newWidgetSurface)
.targetVertex(viz.newWidgetSurface)
.targetMarker("arrowHead")
);
});
});
context.data().forEach(function (row) {
const pos2 = context._viewportSurface.project(row[0], row[1]);
const newAddr = new Shape()
.shape("circle")
.radius(3)
.data(row)
.pos(pos2)
;
vertices.push(newAddr);
if (prevAddr) {
edges.push(new Edge()
.sourceVertex(prevAddr)
.targetVertex(newAddr)
.sourceMarker("none")
.targetMarker("arrow")
);
}
prevAddr = newAddr;
});
this.data({ vertices, edges });
createEdge(source, target) {
return new Edge()
.sourceVertex(source)
.targetVertex(target)
.strokeColor("black")
.showArc(false)
;
}
createEdge(sourceID: string, targetID: string) {
const edgeID = `${sourceID}->${targetID}`;
let retVal = this.edgeMap[edgeID];
if (!retVal) {
retVal = new Edge()
.sourceVertex(this.vertexMap[sourceID])
.targetVertex(this.vertexMap[targetID])
;
this.edgeMap[edgeID] = retVal;
}
this.edges.push(retVal);
return retVal;
}
createEdge(source, target) {
return new Edge()
.sourceVertex(source)
.targetVertex(target)
.strokeColor("black")
.showArc(false)
;
}