forked from ddrilling/asb_cloud_front
Поправлена нижняя граница прокрутки архива
This commit is contained in:
parent
70a7812e81
commit
0de213c3dc
@ -74,7 +74,7 @@ export default function Archive({idWell}) {
|
||||
const offset = e.deltaY * chartInterval * WHEEL_SENSITIVITY
|
||||
const nextStartDate = +prevStartDate + offset
|
||||
const firstPossibleDate = Math.max(loaded.start, dateLimit.from)
|
||||
const lastPossibleDate = Math.min(loaded.end, Date.now()) - chartInterval
|
||||
const lastPossibleDate = Math.min(dateLimit.to, (loaded.end ?? Date.now())) - chartInterval
|
||||
return new Date(Math.max(firstPossibleDate, Math.min(nextStartDate, lastPossibleDate)))
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user