Skip to content

Commit 1571b25

Browse files
authored
Merge pull request #4958 from csholmq/fix/tooltip
fix(tooltip): remove redundant scroll offset
2 parents ee49c4b + 4a92fc5 commit 1571b25

File tree

1 file changed

+1
-1
lines changed
  • packages/mermaid/src/diagrams/flowchart

1 file changed

+1
-1
lines changed

packages/mermaid/src/diagrams/flowchart/flowDb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ const setupToolTips = function (element) {
425425
tooltipElem
426426
.text(el.attr('title'))
427427
.style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')
428-
.style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');
428+
.style('top', window.scrollY + rect.bottom + 'px');
429429
tooltipElem.html(tooltipElem.html().replace(/&lt;br\/&gt;/g, '<br/>'));
430430
el.classed('hover', true);
431431
})

0 commit comments

Comments
 (0)