From 3d2994f89cc763ece4b1cceea178a5c292f0d503 Mon Sep 17 00:00:00 2001 From: somebody Date: Wed, 12 Oct 2022 14:20:57 -0500 Subject: [PATCH] Maybe fix cursor thingey too much not height --- static/koboldai.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/koboldai.js b/static/koboldai.js index be72cfbd..abc729f5 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -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`; });