File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff 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
958964function title_case ( s ) {
@@ -4172,11 +4178,16 @@ function hideHorizonRings(){
41724178
41734179function 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}
You can’t perform that action at this time.
0 commit comments