Skip to content

Commit

Permalink
Merge pull request #4958 from csholmq/fix/tooltip
Browse files Browse the repository at this point in the history
fix(tooltip): remove redundant scroll offset
  • Loading branch information
sidharthv96 authored Nov 9, 2023
2 parents ee49c4b + 4a92fc5 commit 1571b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/flowchart/flowDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + document.body.scrollTop + 'px');
.style('top', window.scrollY + rect.bottom + 'px');
tooltipElem.html(tooltipElem.html().replace(/&lt;br\/&gt;/g, '<br/>'));
el.classed('hover', true);
})
Expand Down

0 comments on commit 1571b25

Please sign in to comment.