mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 02:04:08 +01:00
fix arrow pointer x position
This commit is contained in:
@@ -425,7 +425,14 @@ const drawMessage = async function (diagram, msgModel, lineStartY: number, diagO
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
line = diagram.append('line');
|
line = diagram.append('line');
|
||||||
line.attr('x1', startx);
|
let adjustedStartx = startx;
|
||||||
|
if (
|
||||||
|
type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED ||
|
||||||
|
type === diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID
|
||||||
|
) {
|
||||||
|
startx < stopx ? (adjustedStartx += 3) : (adjustedStartx -= 3);
|
||||||
|
}
|
||||||
|
line.attr('x1', adjustedStartx);
|
||||||
line.attr('y1', lineStartY);
|
line.attr('y1', lineStartY);
|
||||||
line.attr('x2', stopx);
|
line.attr('x2', stopx);
|
||||||
line.attr('y2', lineStartY);
|
line.attr('y2', lineStartY);
|
||||||
|
|||||||
Reference in New Issue
Block a user