Update src/components/HeartbeatBar.vue

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
Peak Twilight 2025-06-18 17:17:13 +02:00 committed by GitHub
parent 4fe257e15c
commit 3a174ea27a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -424,9 +424,9 @@ export default {
const tooltipWidth = 120; // Approximate tooltip width const tooltipWidth = 120; // Approximate tooltip width
let adjustedX = x; let adjustedX = x;
if (x - tooltipWidth / 2 < 10) { if ((x - tooltipWidth / 2) < 10) {
adjustedX = tooltipWidth / 2 + 10; adjustedX = tooltipWidth / 2 + 10;
} else if (x + tooltipWidth / 2 > window.innerWidth - 10) { } else if ((x + tooltipWidth / 2) > (window.innerWidth - 10)) {
adjustedX = window.innerWidth - tooltipWidth / 2 - 10; adjustedX = window.innerWidth - tooltipWidth / 2 - 10;
} }