mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
Geomap: Fix crosshair glitch (#72909)
This commit is contained in:
parent
98b3878231
commit
b0790063b2
@ -317,14 +317,14 @@ function findNearestTimeIndex(timestamps: number[], time: number): number | null
|
||||
if (time < timestamps[probableIdx]) {
|
||||
for (let i = probableIdx; i > 0; i--) {
|
||||
if (time > timestamps[i]) {
|
||||
return i;
|
||||
return i < lastIdx ? i + 1 : lastIdx;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
for (let i = probableIdx; i < lastIdx; i++) {
|
||||
if (time < timestamps[i]) {
|
||||
return i;
|
||||
return i > 0 ? i - 1 : 0;
|
||||
}
|
||||
}
|
||||
return lastIdx;
|
||||
|
Loading…
Reference in New Issue
Block a user