Skip to content

Commit d472df2

Browse files
committed
fix hazards don't fully scroll close #62
1 parent fdbf11d commit d472df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/scripts/modules/hazards.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Hazards extends WeatherDisplay {
122122
// base count change callback
123123
baseCountChange(count) {
124124
// calculate scroll offset and don't go past end
125-
let offsetY = Math.min(this.elem.querySelector('.hazard-lines').getBoundingClientRect().height - 390, (count - 150));
125+
let offsetY = Math.min(this.elem.querySelector('.hazard-lines').offsetHeight - 390, (count - 150));
126126

127127
// don't let offset go negative
128128
if (offsetY < 0) offsetY = 0;

0 commit comments

Comments
 (0)