Merge branch 'master' into develop

This commit is contained in:
Knut Sveidqvist
2020-05-30 17:11:23 +02:00
8 changed files with 71 additions and 59 deletions

View File

@@ -107,8 +107,19 @@ const intersection = (node, outsidePoint, insidePoint) => {
}
};
export const insertEdge = function(elem, edge, clusterDb, diagramType) {
//(edgePaths, e, edge, clusterDb, diagramtype, graph)
export const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph) {
let points = edge.points;
const tail = graph.node(e.v);
var head = graph.node(e.w);
if (head.intersect && tail.intersect) {
points = points.slice(1, edge.points.length - 1);
points.unshift(tail.intersect(points[0]));
points.push(head.intersect(points[points.length - 1]));
}
if (edge.toCluster) {
logger.trace('edge', edge);
logger.trace('to cluster', clusterDb[edge.toCluster]);