From d472df2e264b810fb53db43fdd98a2a403114a58 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Sun, 23 Feb 2025 21:07:34 -0600 Subject: [PATCH] fix hazards don't fully scroll close #62 --- server/scripts/modules/hazards.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/modules/hazards.mjs b/server/scripts/modules/hazards.mjs index c0d2373..a24c0a0 100644 --- a/server/scripts/modules/hazards.mjs +++ b/server/scripts/modules/hazards.mjs @@ -122,7 +122,7 @@ class Hazards extends WeatherDisplay { // base count change callback baseCountChange(count) { // 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 if (offsetY < 0) offsetY = 0;