osd: hide on mouse movement

works for left side but not right side... oh well, still better than nothing
This commit is contained in:
end-4
2025-03-30 09:12:53 +02:00
parent a97af6f3bc
commit dcdb53da9e
3 changed files with 42 additions and 8 deletions
@@ -7,4 +7,10 @@ export function truncateToPrecision(value, precision) {
const factor = Math.pow(10, precision);
const result = Math.round(value * factor) / factor;
return result;
}
export function distance(x1, y1, x2, y2) {
const distanceX = Math.abs(x1 - x2);
const distanceY = Math.abs(y1 - y2);
return Math.sqrt(distanceX * distanceX + distanceY * distanceY)
}