mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-10-31 10:54:15 +01:00 
			
		
		
		
	Added styling for mermaid tooltips
Adjustments of tooltip positioning for large documents Documentation of tooltips
This commit is contained in:
		
							
								
								
									
										56
									
								
								test/examples/interactionAndTooltips.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								test/examples/interactionAndTooltips.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|  | ||||
|     <link rel="stylesheet" href="../../dist/mermaid.css"/> | ||||
|     <script src="../../dist/mermaid.js"></script> | ||||
|     <style> | ||||
|         body{ | ||||
|             background-color: #89896f; | ||||
|         } | ||||
|  | ||||
|     </style> | ||||
|     <script> | ||||
|  | ||||
|         function callback(id){ | ||||
|             alert(id); | ||||
|         } | ||||
|         function callback2(id){ | ||||
|             alert('x'+id); | ||||
|         } | ||||
|     </script> | ||||
| </head> | ||||
|     <body> | ||||
|     <h1>Links to callbacks</h1> | ||||
|     A has a tooltip | ||||
|     <div class="mermaid" id="i211"> | ||||
|     graph LR; | ||||
|         A-->B; | ||||
|         B-->C; | ||||
|         click A callback "Tooltip" | ||||
|         click B "http://www.github.com" "This is a link" | ||||
|         click C callback "Tooltip quite long tooltip. So long that several rows are required... Not just two rows..." | ||||
|     </div> | ||||
|  | ||||
|     <h1>Links to urls</h1> | ||||
|     <div class="mermaid" id="i213"> | ||||
|         graph LR; | ||||
|             A-->B | ||||
|             B-->C | ||||
|             click A callback2 "Tooltip3" | ||||
|     </div> | ||||
|     <div class="mermaid" id="i213"> | ||||
|         graph LR; | ||||
|         subgraph S1 | ||||
|             a-->b | ||||
|         end | ||||
|         subgraph S2 | ||||
|             c-->d | ||||
|             c-->d | ||||
|         end | ||||
|  | ||||
|     </div> | ||||
|  | ||||
|     </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user
	 knsv
					knsv