diff --git a/dist/index.html b/dist/index.html index dc75aa32c..fb0093fb8 100644 --- a/dist/index.html +++ b/dist/index.html @@ -22,10 +22,13 @@ click B testClick "click test"
sequenceDiagram -loop every day - Alice->>John: Hello John, how are you? - John-->>Alice: Great! -end +Alice ->> Bob: Hello Bob, how are you? +Bob-->>John: How about you John? +Bob--x Alice: I am good thanks! +Bob-x John: I am good thanks! +Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. +Bob-->Alice: Checking with John... +Alice->John: Yes... John, how are you?

diff --git a/src/diagrams/sequenceDiagram/sequenceRenderer.js b/src/diagrams/sequenceDiagram/sequenceRenderer.js index 47200dc7c..dfbbf8311 100644 --- a/src/diagrams/sequenceDiagram/sequenceRenderer.js +++ b/src/diagrams/sequenceDiagram/sequenceRenderer.js @@ -180,7 +180,7 @@ const drawNote = function (elem, startx, verticalPos, msg, forceWidth) { let textElem = svgDraw.drawText(g, textObj, rect.width - conf.noteMargin) - let textHeight = textElem[0][0].getBBox().height + let textHeight = (textElem._groups || textElem)[0][0].getBBox().height if (!forceWidth && textHeight > conf.width) { textElem.remove() g = elem.append('g') diff --git a/todo.md b/todo.md index 64d492bbb..15491a610 100644 --- a/todo.md +++ b/todo.md @@ -3,7 +3,5 @@ - Create a desktop client - Flowchart `interpolate` is useless because there is no rendering code using it - Each type of diagram should have its own set of CSS. -- Support customization of gantt diagram xAxis format - - https://github.com/d3/d3-time-format#api-reference - - https://bl.ocks.org/wboykinm/34627426d84f3242e0e6ecb2339e9065 +- Support customization of gantt diagram xAxis format using diagram code - Some one created a great PR: https://github.com/knsv/mermaid/pull/624