Use dynamic recoloring for balloons, targets, cars, payloads, parachutes#327
Merged
TheSkorm merged 8 commits intoprojecthorus:testingfrom Jul 17, 2024
Merged
Use dynamic recoloring for balloons, targets, cars, payloads, parachutes#327TheSkorm merged 8 commits intoprojecthorus:testingfrom
TheSkorm merged 8 commits intoprojecthorus:testingfrom
Conversation
76364fd to
921db61
Compare
Author
|
Okay, this has been rebased now that the deterministic color selection is in place. I have also tweaked the aesthetics of some of the elements to look more like the current version of the site. At this point, if we want to try this in Testing, I think it's about ready. The only remaining changes would be tiny tweaks, which are likely not needed, I think all the SVG files are in good shape to suit their purpose. |
TheSkorm
reviewed
Jul 17, 2024
|
|
||
| marker.shadow = marker_shadow; | ||
| marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors_name[color_index]; | ||
| marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors[color_index]; |
Member
There was a problem hiding this comment.
I'm surprised we still have these special case callsigns in here :/ they don't make sense for sondehub pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This accomplishes the topic discussed in #326 . Now, rather than pulling in a choice of a PNG based on a color (such as parachute-red.png, parachute-blue.png, or parachute-green.png, etc), I've created a set of SVG files which are dynamically recolored at runtime in order to populate the map.
The primary goal for this is to make it easy to add new colors of objects to the map, as well as to change the design of any of the icons easily without needing to modify lots of files at once.
All of these SVGs were created by hand in a text editor. As such, they are very human-readable and very easy to modify (as opposed to if they were created in Inkscape or similar, where all the coordinates would be ugly float values).
The goal in creating the SVGs was to replicate the general look and feel of the existing icons, but not to be a pixel-perfect duplication. There is nothing to say that the existing icons were perfect, and therefore matching their exact proportions was not considered a crucial goal. Given that these are, again, easily modifiable SVG files, anyone who wishes to tweak the look of these icons should be able to do so. I'm also happy to make any tweaks if anyone puts comments on this PR.