fix arrow pointer x position

This commit is contained in:
Ronid1
2024-04-24 12:53:40 -07:00
parent e852156b9f
commit 17fd681bdb

View File

@@ -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);