mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	Fix for issue #178, auto-line wrap of notes in sequence diagrams
This commit is contained in:
		@@ -12,10 +12,11 @@
 | 
			
		||||
                cloneCssStyles: false
 | 
			
		||||
            },
 | 
			
		||||
            sequenceDiagram:{
 | 
			
		||||
                mirrorActors:true
 | 
			
		||||
                mirrorActors:true,
 | 
			
		||||
                height:35
 | 
			
		||||
                
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        };
 | 
			
		||||
        //mermaid.sequenceConfig = '{"diagramMarginX":50,"diagramMarginY":10,"actorMargin":50,"width":150,"height":45,"boxMargin":10,"boxTextMargin":5,"noteMargin":10,"messageMargin":35, "mirrorActors":true}';
 | 
			
		||||
        //mermaid.sequenceConfig = JSON.parse('{"diagramMarginX":50,"diagramMarginY":10,"actorMargin":50,"width":150,"height":165,"boxMargin":10,"boxTextMargin":5,"noteMargin":10,"messageMargin":35}');
 | 
			
		||||
 | 
			
		||||
@@ -28,6 +29,19 @@
 | 
			
		||||
 | 
			
		||||
</head>
 | 
			
		||||
    <body>
 | 
			
		||||
        <h1>Autowrap</h1>
 | 
			
		||||
 | 
			
		||||
    <div class="mermaid">
 | 
			
		||||
        sequenceDiagram
 | 
			
		||||
        Alice->>Bob: Hello Bob, how are you?
 | 
			
		||||
        Bob-->>John: How about you John?
 | 
			
		||||
        Bob--xAlice: I am good thanks!
 | 
			
		||||
        Bob-xJohn: I am good thanks!
 | 
			
		||||
        Note right of John: Bob thinks a long long time, so long that the text does not fit In a row. Bob thinks a long long time, so long that the text does not fit In a row. Bob thinks a long long time, so long that the text does not fit In a row. Bob thinks a long long time, so long that the text does not fit In a row.
 | 
			
		||||
 | 
			
		||||
        Bob-->Alice: Checking with John...
 | 
			
		||||
        Alice->John: Yes... John, how are you?
 | 
			
		||||
    </div>
 | 
			
		||||
    <h1>No line breaks</h1>
 | 
			
		||||
    <div class="mermaid">
 | 
			
		||||
        sequenceDiagram;Alice->>Bob: Hello Bob, how are you?;Bob-->Bob: Hmmm?;Bob-->Alice: Ok;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user