diff --git a/assets/custom-functions.js b/assets/custom-functions.js index e8ba802e136b3a53396d2b5fbee12a204165928e..f9dea0a0c91d868dc59b82274896aaea30d16928 100644 --- a/assets/custom-functions.js +++ b/assets/custom-functions.js @@ -114,10 +114,22 @@ $(document).ready(function () { }); }); +// MAKE FULLSCREEN ICON SMALLER WHEN APP IS FULLSCREEN +function changeFullscreenIcon() { + const isFullscreen = window.innerWidth === screen.width && window.innerHeight === screen.height; + const button = document.getElementById('fullscreen-tab'); + if (isFullscreen) { + button.classList.remove('small'); + } else { + button.classList.add('small'); + } +} + // SEND FULLSCREEN REQUEST TO PARENT WINDOW $(document).ready(function () { $(document).on('click', "#fullscreen-tab", function () { parent.postMessage('fullscreen', '*'); + changeFullscreenIcon(); }) }); diff --git a/assets/style.css b/assets/style.css index 819c3189d6fc45c16c03586e8f32172d70ceec56..82aa3f5e6a6c6605bc27252a0d315db79a6b316b 100644 --- a/assets/style.css +++ b/assets/style.css @@ -64,6 +64,12 @@ a.modebar-btn { color: white; } +#fullscreen-tab.small::after { + font-size: 17px !important; + top: 95%; + right: 11%; +} + .horizontal-menu { background-color: var(--blue) !important; font-family: "Roboto", sans-serif; @@ -633,6 +639,7 @@ div.dropdown-menu.show { .info { padding: .15rem .15rem !important; + min-width: 24%; max-width: 79%; } @@ -770,6 +777,7 @@ div.dropdown-menu.show { .leaflet-control-colorbar { top: 42px !important; font-size: .8em !important; + white-space: nowrap; } .leaflet-control-zoom-fullscreen { diff --git a/data_handler.py b/data_handler.py index d48a43a84f691a6a12b61d4a6dd6abb8765f225e..810e5d357575e0417a2ca15e4ee1985e617635f3 100644 --- a/data_handler.py +++ b/data_handler.py @@ -1064,7 +1064,7 @@ class FigureHandler(object): if zoom is None: zoom = 3.5 -(aspect[0]-aspect[0]*0.4) if colorbar is not None: - colorbar.width = 320 - 30 * aspect[0] + colorbar.width = 320 - 37 * aspect[0] colorbar.height = 8 if DEBUG: print("ZOOM", zoom) if DEBUG: print("CENTER", center)