mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02: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 {
|
||||
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('x2', stopx);
|
||||
line.attr('y2', lineStartY);
|
||||
|
Reference in New Issue
Block a user