mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 22:39:56 +02:00
Bug fixes in new functionality, intersections not taken into account in nodes used by new graph engine. Graph flowchart not usable when integrating using mermaid.core. Incorrect flwochart docs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { logger } from '../logger'; // eslint-disable-line
|
||||
import createLabel from './createLabel';
|
||||
import { line, curveBasis } from 'd3';
|
||||
import { line, svg, curveBasis } from 'd3';
|
||||
import { getConfig } from '../config';
|
||||
|
||||
let edgeLabels = {};
|
||||
@@ -100,8 +100,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