sequenceDiagram
Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
Bob->>Alice: I'm short though
-flowchart TB
- subgraph two
- b1
- end
- subgraph three
- c1-->c2
- end
- c1 --apa apa apa--> b1
- b1 --> c2
-
+
+ %%{init: {'config': {'wrap': true }}}%%
+ sequenceDiagram
+ participant A as Extremely utterly
+ A->>Bob: long line of longness which had preivously overflown the actor box as it is much longer than what it should be
+ Bob-->A: Pasten !
+
flowchart BT
subgraph a
diff --git a/src/diagrams/sequence/sequenceRenderer.js b/src/diagrams/sequence/sequenceRenderer.js
index 88e952250..e8da85436 100644
--- a/src/diagrams/sequence/sequenceRenderer.js
+++ b/src/diagrams/sequence/sequenceRenderer.js
@@ -248,6 +248,7 @@ const drawNote = function(elem, noteModel) {
* @param msgModel - the model containing fields describing a message
*/
const drawMessage = function(g, msgModel) {
+ bounds.bumpVerticalPos(10);
const { startx, stopx, starty, message, type, sequenceIndex, wrap } = msgModel;
const lines = common.splitBreaks(message).length;
let textDims = utils.calculateTextDimensions(message, conf.messageFont());
@@ -257,7 +258,7 @@ const drawMessage = function(g, msgModel) {
bounds.bumpVerticalPos(lineHeight);
const textObj = svgDraw.getTextObj();
textObj.x = startx;
- textObj.y = starty;
+ textObj.y = starty + 10;
textObj.width = stopx - startx;
textObj.class = 'messageText';
textObj.dy = '1em';
@@ -273,7 +274,7 @@ const drawMessage = function(g, msgModel) {
drawText(g, textObj);
- let totalOffset = textDims.height;
+ let totalOffset = textDims.height - 10;
let textWidth = textDims.width;