mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
@@ -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`;
|
||||
});
|
||||
|
Reference in New Issue
Block a user