mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
This commit is contained in:
parent
7e9ab546eb
commit
32b2ee8cab
@ -33,23 +33,18 @@ flowchart BT
|
||||
c1 --apa apa apa--> b1
|
||||
two --> c2
|
||||
</div>
|
||||
<div class="mermaid" style="width: 50%; height: 20%;">
|
||||
<div class="mermaid" style="width: 50%; height: 200px;">
|
||||
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
|
||||
</div>
|
||||
<div class="mermaid2" style="width: 50%; height: 20%;">
|
||||
flowchart TB
|
||||
subgraph two
|
||||
b1
|
||||
end
|
||||
subgraph three
|
||||
c1-->c2
|
||||
end
|
||||
c1 --apa apa apa--> b1
|
||||
b1 --> c2
|
||||
</div>
|
||||
<div class="mermaid" style="width: 50%; height: 20%;">
|
||||
<div class="mermaid" style="width: 50%; height: 200px;">
|
||||
%%{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 ! </div>
|
||||
<div class="mermaid2" style="width: 50%; height: 200px;">
|
||||
|
||||
flowchart BT
|
||||
subgraph a
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user