Merge pull request #1411 from ivan-danilov/sequence-over-notes-position-fix

Fixed SequenceDiagram over note horizontal position
This commit is contained in:
Knut Sveidqvist
2020-05-22 09:33:54 +02:00
committed by GitHub

View File

@@ -638,14 +638,12 @@ export const draw = function(text, id) {
} else {
// Multi-actor over
forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
let x =
startx < stopx
? startx + (actors[msg.from].width - conf.actorMargin) / 2
: stopx + (actors[msg.to].width - conf.actorMargin) / 2;
drawNote(
diagram,
(startx + stopx + noteWidth - forceWidth) / 2,
bounds.getVerticalPos(),
msg,
forceWidth
);
drawNote(diagram, x, bounds.getVerticalPos(), msg, forceWidth);
}
break;
case parser.yy.LINETYPE.ACTIVE_START: