mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-19 16:26:43 +02:00
#5237 Fix for issue with edge routing for elk layout
This commit is contained in:
@@ -620,7 +620,7 @@ export const render = async (data4Layout: LayoutData, svg, element, algorithm) =
|
|||||||
}
|
}
|
||||||
if (endNode.isGroup) {
|
if (endNode.isGroup) {
|
||||||
const bbox = endNode.domId.node().getBBox();
|
const bbox = endNode.domId.node().getBBox();
|
||||||
ew = Math.max(startNode.width, endNode.labels[0].width + endNode.padding);
|
ew = Math.max(endNode.width, endNode.labels[0].width + endNode.padding);
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
'UIO width',
|
'UIO width',
|
||||||
@@ -638,10 +638,6 @@ export const render = async (data4Layout: LayoutData, svg, element, algorithm) =
|
|||||||
x: startNode.x + startNode.width / 2 + offset.x,
|
x: startNode.x + startNode.width / 2 + offset.x,
|
||||||
y: startNode.y + startNode.height / 2 + offset.y,
|
y: startNode.y + startNode.height / 2 + offset.y,
|
||||||
});
|
});
|
||||||
edge.points.push({
|
|
||||||
x: endNode.x + endNode.width / 2 + offset.x,
|
|
||||||
y: endNode.y + endNode.height / 2 + offset.y,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (endNode.shape === 'diamond') {
|
if (endNode.shape === 'diamond') {
|
||||||
edge.points.push({
|
edge.points.push({
|
||||||
@@ -665,8 +661,8 @@ export const render = async (data4Layout: LayoutData, svg, element, algorithm) =
|
|||||||
edge.points = cutPathAtIntersect(
|
edge.points = cutPathAtIntersect(
|
||||||
edge.points,
|
edge.points,
|
||||||
{
|
{
|
||||||
x: endNode.x + ew / 2 + offset.x,
|
x: endNode.x + ew / 2 + endNode.offset.x,
|
||||||
y: endNode.y + endNode.height / 2 + offset.y,
|
y: endNode.y + endNode.height / 2 + endNode.offset.y,
|
||||||
width: ew,
|
width: ew,
|
||||||
height: endNode.height,
|
height: endNode.height,
|
||||||
padding: endNode.padding,
|
padding: endNode.padding,
|
||||||
|
Reference in New Issue
Block a user