mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 22:39:56 +02:00
Merge branch 'master' into develop
This commit is contained in:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user