Hide forecast timeline when time spread is under 1 hour
This commit is contained in:
parent
6145f80c22
commit
583bcb2b0b
1 changed files with 8 additions and 0 deletions
|
|
@ -680,6 +680,14 @@ export const PropagationMap = {
|
|||
return
|
||||
}
|
||||
|
||||
// Hide timeline if all times are within 1 hour (no real forecast spread)
|
||||
const firstDt = new Date(this.timelineData[0].time)
|
||||
const lastDt = new Date(this.timelineData[this.timelineData.length - 1].time)
|
||||
if (lastDt - firstDt < 3600000) {
|
||||
this.timelineEl.style.display = "none"
|
||||
return
|
||||
}
|
||||
|
||||
const now = new Date()
|
||||
const items = this.timelineData.map((t, idx) => {
|
||||
const dt = new Date(t.time)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue