diff --git a/img/splash/splash-narrow.png b/img/splash/splash-narrow.png new file mode 100644 index 0000000..8738ab2 Binary files /dev/null and b/img/splash/splash-narrow.png differ diff --git a/img/splash/splash-wide.png b/img/splash/splash-wide.png new file mode 100644 index 0000000..d7eff35 Binary files /dev/null and b/img/splash/splash-wide.png differ diff --git a/index.html b/index.html index 874429f..cf46f36 100644 --- a/index.html +++ b/index.html @@ -27,6 +27,7 @@
+
@@ -210,6 +211,13 @@

Visibility

+
+ Only show visible on sidebar +
+ + +
+

Other


diff --git a/js/app.js b/js/app.js index 62a976d..de44b5e 100644 --- a/js/app.js +++ b/js/app.js @@ -722,6 +722,7 @@ $(window).ready(function() { '#sw_hide_horizon', '#sw_hide_titles', '#sw_layers_launches', + '#sw_selective_sidebar', "#sw_nowelcome", "#sw_interpolate", ]; @@ -820,6 +821,9 @@ $(window).ready(function() { if(on) map.overlayMapTypes.setAt("1", overlayAPRS); else map.overlayMapTypes.setAt("1", null); break; + case "opt_selective_sidebar": + sidebar_update(); + break; case "opt_layers_launches": if(on) { map.removeLayer(launches); diff --git a/js/tracker.js b/js/tracker.js index 4f6f382..69843e4 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -878,6 +878,7 @@ function load() { map.on('moveend', function (e) { lhash_update(); + sidebar_update(); }); map.on('baselayerchange', function (e) { @@ -926,6 +927,7 @@ function load() { map.on('moveend', function() { lhash_update(); + sidebar_update(); }); map.on('baselayerchange', function() { lhash_update(); @@ -1053,6 +1055,22 @@ function panToRecovery(rcallsign) { } } +function sidebar_update() { + if (offline.get('opt_selective_sidebar')) { + for (let serial in vehicles) { + if (map.getBounds().contains(vehicles[serial].marker.getLatLng())) { + $("#main .vehicle"+vehicles[serial].uuid).show(); + } else { + $("#main .vehicle"+vehicles[serial].uuid).hide(); + } + } + } else { + for (let serial in vehicles) { + $("#main .vehicle"+vehicles[serial].uuid).show(); + } + } +} + function title_case(s) { return s.replace(/\w\S*/g, function(txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); @@ -1528,6 +1546,14 @@ function updateVehicleInfo(vcallsign, newPosition) { $('.landscape').append('
'); } + if (offline.get('opt_selective_sidebar')) { + if (map.getBounds().contains(vehicles[vcallsign].marker.getLatLng())) { + $("#main .vehicle"+vehicle.uuid).show(); + } else { + $("#main .vehicle"+vehicle.uuid).hide(); + } + } + } else if(elm.attr('data-vcallsign') === undefined) { elm.attr('data-vcallsign', vcallsign); }