Commit Graph
33 Commits
Author SHA1 Message Date
Matt Walsh aaf6a3111c improve loading of active warnings/hazards 2026-11-22 13:51:59 -06:00
Matt Walsh 4b61a07d2a minor code cleanup 2026-09-28 22:00:23 -05:00
Matt Walsh 795b5047a5 consolidate get data from other display procedure 2026-09-27 18:24:54 -05:00
Matt Walsh b6bdbe1e8a select the right time zone for some displays 2026-09-27 18:10:48 -05:00
Matt Walsh f3503e329a music auto play, custom scroll text and gps failure fixes 2026-09-27 17:44:45 -05:00
Matt Walsh b246bc4aaf switch to tab layout for settings and displays 2026-09-22 23:37:28 -05:00
Matt Walsh 05fb094694 condense hourly, travel and hazards to shared "scrolling" class 2026-09-17 14:20:31 -05:00
Matt Walsh 4cf4ef3244 cleanup hourly, travelforecast and hazards.mjs 2026-09-17 13:59:59 -05:00
Matt Walsh 4df95fb15e clean up current weather and hazards 2026-09-16 13:39:13 -05:00
Matt Walsh 2b4f83cfc0 update eslint and adjust code for best practices 2026-09-14 13:03:50 -05:00
AirRocker 40fb29a080 fix vertical scroll freezing after content is rebuilt
The scroll cache in hazards, hourly and travel forecast is invalidated by
comparing element identity, but the lines element is persistent - a rebuild
only replaces its children - and displayHeight is a fixed value from css. Both
conditions stay false after the first measurement, so maxOffset keeps the
height of whatever content was measured first. When later content is taller,
the scroll clamps at the old offset and sits frozen there for the rest of the
screen's timing.

Invalidate the cache explicitly when the list is rebuilt, and reset
navBaseCount so new content scrolls from the top.

Invalidating alone would regress hazards: it refreshes every 60 seconds but a
long multi-alert scroll can run for several minutes, so rebuilding on every
refresh would restart it from the top and it would never reach the end. Each
display now also compares a signature of the content it is about to render and
skips the rebuild entirely when nothing changed, leaving an in-progress scroll
undisturbed. Hourly's signature includes the starting hour because its row
labels are derived from the current time.
2026-07-20 10:14:20 -05:00
Matt Walsh fa16095355 filter for actual alerts (not test) close #141 2025-09-09 22:07:42 -05:00
Matt Walsh 1732a3381f fix hazards displaying when disabled (sometimes) close #140 2025-09-09 19:36:23 -05:00
Eddy G bec80a1ebe Refactor alert/hazard system with timing and display improvements
- Replace magic numbers with seconds-based timing constants
- Switch from scrollTo() to hardware-accelerated transform
- Add scroll caching to prevent repeated DOM queries every scroll cycle
- Switch to safeJson() for centralized error handling across alert modules
- Horizontal alert scroll now goes edge-to-edge
- Integrate global speed settings into horizontal scroll timing
- Improve error handling flow with better fallback behavior for missing data
- Remvoe unused getCurrentData() function in hazards.mjs
- Move background color from scrolling element to container to avoid
    showing the underlying content when scrolling with trasnform
2025-06-24 23:41:44 -04:00
Matt Walsh 7c50f5f1d7 issues changing locations 2025-06-02 15:57:58 -05:00
Matt Walsh 46da573715 hazard scroll working, needs styling #92 2025-06-01 23:25:07 -05:00
Matt Walsh a83afa71cd code cleanup 2025-05-29 08:30:01 -05:00
Matt Walsh 09fb698350 locally limit the number of alerts/hazards 2025-05-23 16:08:11 -05:00
Matt Walsh bc77a1891c remove limit for alert endpoint due to recent api change 2025-05-23 15:43:58 -05:00
Matt Walsh cc896bf18d latest observations silent refresh 2025-04-02 22:10:59 -05:00
Matt Walsh 8fa00b34b4 hourly and travel forecast silent reload 2025-04-02 16:45:11 -05:00
Matt Walsh 23cc1a1f7a add refresh flag to getdata funcions 2025-04-02 11:10:58 -05:00
Matt Walsh d472df2e26 fix hazards don't fully scroll close #62 2025-02-23 21:07:34 -06:00
Matt Walsh e2d7a96971 linting cleanup 2024-10-21 19:21:05 -05:00
Matt Walsh c7889eaa2c hazards only on first run through after load/refresh
sorting of hazards based on type tornado, hurricane, etc

5.13.0
2024-10-08 10:34:57 -05:00
Matt Walsh 9aa877d6fb better hazard formatting 2024-04-11 22:46:50 -05:00
Matt Walsh 3743c45de6 additional eslint rules 2023-01-06 14:39:39 -06:00
Matt Walsh 4c3fcfc358 correct hazard scroll time 2022-12-21 14:44:36 -06:00
Matt Walsh 366f527aee auto play when hazard is present 2022-12-21 14:05:14 -06:00
Matt Walsh dfd9facc79 Merge branch 'main' of github.com:netbymatt/ws4kp 2022-12-19 10:14:37 -06:00
Matt Walsh 5b926a358e no hazards, blizzard 2022-12-19 10:14:33 -06:00
Matt Walsh af17b3c690 progress light mode colors 2022-12-14 21:47:27 -06:00
Matt Walsh 111f077e20 add hazards 2022-12-14 16:28:33 -06:00