fix hazards don't fully scroll close #62
This commit is contained in:
parent
fdbf11dcd4
commit
d472df2e26
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ class Hazards extends WeatherDisplay {
|
||||||
// base count change callback
|
// base count change callback
|
||||||
baseCountChange(count) {
|
baseCountChange(count) {
|
||||||
// calculate scroll offset and don't go past end
|
// calculate scroll offset and don't go past end
|
||||||
let offsetY = Math.min(this.elem.querySelector('.hazard-lines').getBoundingClientRect().height - 390, (count - 150));
|
let offsetY = Math.min(this.elem.querySelector('.hazard-lines').offsetHeight - 390, (count - 150));
|
||||||
|
|
||||||
// don't let offset go negative
|
// don't let offset go negative
|
||||||
if (offsetY < 0) offsetY = 0;
|
if (offsetY < 0) offsetY = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue