mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-24 17:59:39 +02:00
Merge pull request #1411 from ivan-danilov/sequence-over-notes-position-fix
Fixed SequenceDiagram over note horizontal position
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user