mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
Fix edge markers being flipped
This commit is contained in:
@@ -463,15 +463,6 @@ export const insertEdge = function (elem, edge, clusterDb, diagramType, startNod
|
|||||||
|
|
||||||
let lineData = points.filter((p) => !Number.isNaN(p.y));
|
let lineData = points.filter((p) => !Number.isNaN(p.y));
|
||||||
lineData = fixCorners(lineData);
|
lineData = fixCorners(lineData);
|
||||||
let lastPoint = lineData[lineData.length - 1];
|
|
||||||
if (lineData.length > 1) {
|
|
||||||
lastPoint = lineData[lineData.length - 1];
|
|
||||||
const secondLastPoint = lineData[lineData.length - 2];
|
|
||||||
const diffX = (lastPoint.x - secondLastPoint.x) / 2;
|
|
||||||
const diffY = (lastPoint.y - secondLastPoint.y) / 2;
|
|
||||||
const midPoint = { x: secondLastPoint.x + diffX, y: secondLastPoint.y + diffY };
|
|
||||||
lineData.splice(-1, 0, midPoint);
|
|
||||||
}
|
|
||||||
let curve = curveBasis;
|
let curve = curveBasis;
|
||||||
if (edge.curve) {
|
if (edge.curve) {
|
||||||
curve = edge.curve;
|
curve = edge.curve;
|
||||||
|
Reference in New Issue
Block a user