mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +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 {
|
} else {
|
||||||
// Multi-actor over
|
// Multi-actor over
|
||||||
forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
|
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(
|
drawNote(diagram, x, bounds.getVerticalPos(), msg, forceWidth);
|
||||||
diagram,
|
|
||||||
(startx + stopx + noteWidth - forceWidth) / 2,
|
|
||||||
bounds.getVerticalPos(),
|
|
||||||
msg,
|
|
||||||
forceWidth
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case parser.yy.LINETYPE.ACTIVE_START:
|
case parser.yy.LINETYPE.ACTIVE_START:
|
||||||
|
Reference in New Issue
Block a user