fix(tooltip): change position of tooltip to not cover node
Position the tooltip centered, just below the node being hovered. Update packages/mermaid/src/diagrams/flowchart/flowDb.js Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
parent
8f2a5064cb
commit
a3ee21d7fc
|
@ -425,7 +425,7 @@ const setupToolTips = function (element) {
|
|||
tooltipElem
|
||||
.text(el.attr('title'))
|
||||
.style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')
|
||||
.style('top', window.scrollY + rect.top - 14 + 'px');
|
||||
.style('top', window.scrollY + rect.bottom + 'px');
|
||||
tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, '<br/>'));
|
||||
el.classed('hover', true);
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue