Skip to content

Commit b07d50e

Browse files
committed
Restore car index, remove rpi
1 parent 399d196 commit b07d50e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

js/tracker.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ var manual_pan = false;
6363

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

6869
var nyan_color_index = 0;
@@ -2534,11 +2535,7 @@ function addPosition(position) {
25342535
marker.addTo(map);
25352536
} else {
25362537
vehicle_type = "balloon";
2537-
let colorHash = 0;
2538-
for (let i = 0; i < vcallsign.length; i++){
2539-
colorHash += vcallsign.charCodeAt(i);
2540-
}
2541-
color_index = colorHash % balloon_colors.length;
2538+
color_index = balloon_index++ % balloon_colors.length;
25422539

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

25872584
marker.shadow = marker_shadow;
2588-
marker.balloonColor = (vcallsign == "PIE") ? "rpi" : balloon_colors[color_index];
2585+
marker.balloonColor = balloon_colors[color_index];
25892586
marker.mode = 'balloon';
25902587
marker.setMode = function(mode) {
25912588
if(this.mode == mode) return;

0 commit comments

Comments
 (0)