Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ var manual_pan = false;

var car_index = 0;
var car_colors = ["blue", "red", "green", "yellow", "teal", "purple"];
var balloon_index = 0;
var balloon_colors = ["red", "blue", "lime", "magenta", "#ffb300", "#00ffff"];

var nyan_color_index = 0;
Expand Down Expand Up @@ -2534,11 +2535,7 @@ function addPosition(position) {
marker.addTo(map);
} else {
vehicle_type = "balloon";
let colorHash = 0;
for (let i = 0; i < vcallsign.length; i++){
colorHash += vcallsign.charCodeAt(i);
}
color_index = colorHash % balloon_colors.length;
color_index = balloon_index++ % balloon_colors.length;

image_src = recolorSVG(host_url + markers_url + "balloon.svg", balloon_colors[color_index]);
image_src_size = [46,84];
Expand Down Expand Up @@ -2585,7 +2582,7 @@ function addPosition(position) {
};

marker.shadow = marker_shadow;
marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors[color_index];
marker.balloonColor = balloon_colors[color_index];
marker.mode = 'balloon';
marker.setMode = function(mode) {
if(this.mode == mode) return;
Expand Down