mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Maybe fix cursor thingey too much not height
This commit is contained in:
@@ -5062,6 +5062,7 @@ function initalizeTooltips() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const xOffset = 10;
|
const xOffset = 10;
|
||||||
|
const yOffset = 15;
|
||||||
|
|
||||||
document.addEventListener("mousemove", function(event) {
|
document.addEventListener("mousemove", function(event) {
|
||||||
if (!tooltipActive) return;
|
if (!tooltipActive) return;
|
||||||
@@ -5080,6 +5081,8 @@ function initalizeTooltips() {
|
|||||||
let yOverflow = (y + tooltip.clientHeight) - window.innerHeight;
|
let yOverflow = (y + tooltip.clientHeight) - window.innerHeight;
|
||||||
if (yOverflow > 0) y -= yOverflow;
|
if (yOverflow > 0) y -= yOverflow;
|
||||||
|
|
||||||
|
if (yOverflow + yOffset < 0) y += yOffset;
|
||||||
|
|
||||||
tooltip.style.left = `${x}px`;
|
tooltip.style.left = `${x}px`;
|
||||||
tooltip.style.top = `${y}px`;
|
tooltip.style.top = `${y}px`;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user