Merge pull request #203 from one-some/UI2

Cursor height
This commit is contained in:
ebolam
2022-10-12 15:22:30 -04:00
committed by GitHub

View File

@@ -5062,6 +5062,7 @@ function initalizeTooltips() {
}
const xOffset = 10;
const yOffset = 15;
document.addEventListener("mousemove", function(event) {
if (!tooltipActive) return;
@@ -5080,6 +5081,8 @@ function initalizeTooltips() {
let yOverflow = (y + tooltip.clientHeight) - window.innerHeight;
if (yOverflow > 0) y -= yOverflow;
if (yOverflow + yOffset < 0) y += yOffset;
tooltip.style.left = `${x}px`;
tooltip.style.top = `${y}px`;
});