-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pak 3984 #20
Conversation
Jonifmi
commented
Sep 26, 2024
- Refactored code for adding warning symbols to make it easier to add new symbols.
- Added placeholder icons for newly introduced icons.
- General refactoring for better maintainability and easier future development.
]; | ||
|
||
// Create table rows for the legend | ||
for (let i = 0; i < levels.length; i += 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(With my not-so-up-to-date skills), is it this syntax for incrementing OK, and is it incremented by 2 on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Yes it is on purpose. After reading the code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in this case, however, +1 would give the same result
: symbolPath + 'surf-height.png'; | ||
} else { | ||
// Handle events based on eventRaw or eventSelector | ||
let eventMapping = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider sorting alphabetically by match, or perhaps by icon. Or maybe if there is some more generic event type to be used here. E.g. sort wave and tsunami and high tide and other "watery evens" close to each other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some sort of manual arrangement would be practical and i'll think about a good solution. Alphabetical order doesn't work because, for example, in cases of flooding, the "flash flood" warning would be before more exact warning types, and the function would pick it instead of checking for exact warning types after that.