Skip to content

Commit

Permalink
Merge pull request #1314 from rmedaer/feature/multiline-sequence-message
Browse files Browse the repository at this point in the history
Feature/Multiline sequence message
  • Loading branch information
knsv authored Mar 25, 2020
2 parents 6ddd394 + d409da2 commit 9e75993
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/diagrams/sequence/sequenceRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ const drawMessage = function(elem, startx, stopx, verticalPos, msg, sequenceInde
const offsetLineCounter = counterBreaklines - 1;
const totalOffset = offsetLineCounter * breaklineOffset;

bounds.bumpVerticalPos(totalOffset);

let textWidth = (textElem._groups || textElem)[0][0].getBBox().width;

let line;
Expand Down Expand Up @@ -295,9 +297,9 @@ const drawMessage = function(elem, startx, stopx, verticalPos, msg, sequenceInde
} else {
line = g.append('line');
line.attr('x1', startx);
line.attr('y1', verticalPos);
line.attr('y1', verticalPos + totalOffset);
line.attr('x2', stopx);
line.attr('y2', verticalPos);
line.attr('y2', verticalPos + totalOffset);
bounds.insert(
startx,
bounds.getVerticalPos() - 10 + totalOffset,
Expand Down

0 comments on commit 9e75993

Please sign in to comment.