mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-06 23:59:37 +02:00
Added styling for mermaid tooltips
Adjustments of tooltip positioning for large documents Documentation of tooltips
This commit is contained in:
@@ -257,7 +257,7 @@ var setupToolTips = function(element){
|
||||
.style("opacity", .9);
|
||||
tooltipElem.html(el.attr('title'))
|
||||
.style("left", (rect.left+(rect.right-rect.left)/2) + "px")
|
||||
.style("top", (rect.top-28) + "px");
|
||||
.style("top", (rect.top-14+document.body.scrollTop) + "px");
|
||||
var el = d3.select(this);
|
||||
el.classed('hover',true);
|
||||
|
||||
|
@@ -7,4 +7,18 @@
|
||||
text {
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
div.mermaidTooltip {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
max-width: 200px;
|
||||
padding: 2px;
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-size: 12px;
|
||||
background: @secondBkg;
|
||||
border: 1px solid @border2;
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
z-index:100;
|
||||
}
|
@@ -7,4 +7,18 @@
|
||||
text {
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-size:14px;
|
||||
}
|
||||
|
||||
div.mermaidTooltip {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
max-width: 200px;
|
||||
padding: 2px;
|
||||
font-family: 'trebuchet ms', verdana, arial;
|
||||
font-size: 12px;
|
||||
background: @secondBkg;
|
||||
border: 1px solid @border2;
|
||||
border-radius: 2px;
|
||||
pointer-events: none;
|
||||
z-index:100;
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
* title: mermaidAPI
|
||||
* order: 5
|
||||
* ---
|
||||
* #mermaidAPI
|
||||
* # mermaidAPI
|
||||
* This is the api to be used when handling the integration with the web page instead of using the default integration
|
||||
* (mermaid.js).
|
||||
*
|
||||
|
Reference in New Issue
Block a user