Skip to content

Commit b9cdce5

Browse files
committed
fix horizon rings mode selector
1 parent 9b4b486 commit b9cdce5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

js/sondehub.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,14 @@ function sidebar_update() {
951951
map.removeLayer(vehicles[serial].marker_shadow);
952952
set_polyline_visibility(serial,false)
953953
}
954+
954955
}
955956
}
957+
if(offline.get("opt_hide_horizon")) {
958+
showHorizonRings();
959+
} else {
960+
hideHorizonRings();
961+
}
956962
}
957963

958964
function title_case(s) {
@@ -4172,11 +4178,16 @@ function hideHorizonRings(){
41724178

41734179
function showHorizonRings(){
41744180
for(var vcallsign in vehicles) {
4175-
if(vehicles[vcallsign].vehicle_type == "balloon"){
4181+
if(vehicles[vcallsign].vehicle_type == "balloon" && (!isVehicleFiltered(vcallsign))){
41764182
map.addLayer(vehicles[vcallsign].horizon_circle);
41774183
map.addLayer(vehicles[vcallsign].subhorizon_circle);
41784184
map.addLayer(vehicles[vcallsign].horizon_circle_title);
41794185
map.addLayer(vehicles[vcallsign].subhorizon_circle_title);
4186+
} else if ( vehicles[vcallsign].vehicle_type == "balloon" ) {
4187+
map.removeLayer(vehicles[vcallsign].horizon_circle);
4188+
map.removeLayer(vehicles[vcallsign].subhorizon_circle);
4189+
map.removeLayer(vehicles[vcallsign].horizon_circle_title);
4190+
map.removeLayer(vehicles[vcallsign].subhorizon_circle_title);
41804191
}
41814192
}
41824193
}

0 commit comments

Comments
 (0)