mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-19 02:36:47 +02:00
Update src/components/HeartbeatBar.vue
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
4fe257e15c
commit
3a174ea27a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue