@@ -1605,7 +1605,7 @@ function initMap() {
16051605 } ) ;
16061606
16071607 map . on ( 'moveend' , function ( evt ) {
1608- debouncedSaveSettings ( ) ;
1608+ debouncedSaveMapView ( ) ;
16091609 debouncedDrawMap ( ) ;
16101610 } ) ;
16111611
@@ -2572,11 +2572,18 @@ function toggleMenu() {
25722572 menuButton . classList . toggle ( "menu_icon" ) ;
25732573 menuButton . classList . toggle ( "close_icon" ) ;
25742574
2575+ syncMenuScrim ( ) ;
2576+ }
2577+
2578+ function syncMenuScrim ( ) {
2579+ const menubar = document . getElementById ( "menubar" ) ;
25752580 const floats = [ "absolute" , "fixed" ] . includes ( getComputedStyle ( menubar ) . position ) ;
25762581 document . getElementById ( "menubar-overlay" ) . classList
25772582 . toggle ( "active" , menubar . classList . contains ( "visible" ) && floats ) ;
25782583}
25792584
2585+ window . matchMedia ( "(min-width: 750px)" ) . addEventListener ( "change" , syncMenuScrim ) ;
2586+
25802587function initFullScreen ( ) {
25812588 document . addEventListener ( "fullscreenchange" , handleFullScreenChange ) ;
25822589 document . addEventListener ( "mozfullscreenchange" , handleFullScreenChange ) ;
@@ -3389,7 +3396,18 @@ const handlePointerMove = function (pixel, target) {
33893396 ( ) => ol . proj . toLonLat ( map . getCoordinateFromPixel ( pixel ) ) ) ;
33903397} ;
33913398
3392- const debouncedSaveSettings = debounce ( saveSettings , 250 ) ;
3399+ function saveMapView ( ) {
3400+ if ( map === undefined ) return ;
3401+ const center = ol . proj . toLonLat ( map . getView ( ) . getCenter ( ) ) ;
3402+ settings . lat = center [ 1 ] ;
3403+ settings . lon = center [ 0 ] ;
3404+ settings . zoom = map . getView ( ) . getZoom ( ) ;
3405+ localStorage [ context ] = JSON . stringify ( settings ) ;
3406+ community . notifyCommunityPopupView ( ) ;
3407+ updateMapURL ( ) ;
3408+ }
3409+
3410+ const debouncedSaveMapView = debounce ( saveMapView , 250 ) ;
33933411const debouncedDrawMap = debounce ( redrawMap , 250 ) ;
33943412const debounceShowHoverTrack = debounce ( showHoverTrack , 250 ) ;
33953413
@@ -3450,6 +3468,12 @@ function updateForLegacySettings() {
34503468 delete settings . latlon_in_dms ;
34513469 }
34523470
3471+ if ( 'realtime_filter_mmsis' in settings ) {
3472+ if ( Array . isArray ( settings . realtime_filter_mmsis ) && settings . realtime_filter_mmsis . length && ! ( settings . realtime_filters || [ ] ) . length )
3473+ settings . realtime_filters = settings . realtime_filter_mmsis . map ( ( m ) => ( { kind : 'mmsi' , value : m } ) ) ;
3474+ delete settings . realtime_filter_mmsis ;
3475+ }
3476+
34533477 if ( ! ( "showPlanesAtFirst" in settings ) ) {
34543478 settings . showPlanesAtFirst = true ;
34553479 settings . map_overlay . push ( "Aircraft" ) ;
@@ -5238,11 +5262,11 @@ function showAboutDialog() {
52385262 </p>
52395263 <p>
52405264 The web-interface gratefully uses the following libraries:
5241- <a href="https://www.chartjs.org/docs/latest/charts/line.html" target="_blank" rel="noopener" rel=" nofollow">chart.js</a>,
5242- <a href="https://www.chartjs.org/chartjs-plugin-annotation/latest/" target="_blank" rel="noopener" rel=" nofollow">chart.js annotation plugin</a>,
5243- <a href="https://openlayers.org/" target="_blank" rel="noopener" rel=" nofollow">openlayers</a>,
5244- <a href="https://fonts.google.com/icons?selected=Material+Icons" target="_blank" rel="noopener" rel=" nofollow">Material Design Icons</a>,
5245- <a href="https://tabulator.info/" target="_blank" rel="noopener" rel=" nofollow">tabulator</a>,
5265+ <a href="https://www.chartjs.org/docs/latest/charts/line.html" target="_blank" rel="noopener nofollow">chart.js</a>,
5266+ <a href="https://www.chartjs.org/chartjs-plugin-annotation/latest/" target="_blank" rel="noopener nofollow">chart.js annotation plugin</a>,
5267+ <a href="https://openlayers.org/" target="_blank" rel="noopener nofollow">openlayers</a>,
5268+ <a href="https://fonts.google.com/icons?selected=Material+Icons" target="_blank" rel="noopener nofollow">Material Design Icons</a>,
5269+ <a href="https://tabulator.info/" target="_blank" rel="noopener nofollow">tabulator</a>,
52465270 <a href="https://github.com/markedjs/marked" target="_blank" rel="noopener">marked</a>, and
52475271 <a href="https://github.com/lipis/flag-icons" target="_blank" rel="noopener">flag-icons</a>. Please consult the links for the respective licenses.
52485272 </p>` ;
0 commit comments