fix(ui): stop map chrome overlapping on phone
Retune the 820px layout so GIBS sits as a full-width bar under the header, LAYERS starts collapsed top-left, zoom stays top-right, and the DVR row clears the ticker. Hide attribution and map-hint on phone so NASA/RainViewer text no longer paints through MKT/NEWS.
This commit is contained in:
parent
5434dda2a9
commit
82ef815e20
1 changed files with 69 additions and 2 deletions
|
|
@ -608,7 +608,6 @@
|
||||||
.tick-label { min-width: 56px; padding: 0 0.5rem; }
|
.tick-label { min-width: 56px; padding: 0 0.5rem; }
|
||||||
.tick-tag { display: none; }
|
.tick-tag { display: none; }
|
||||||
.hud-chips { display: none; }
|
.hud-chips { display: none; }
|
||||||
.map-hint { max-width: 80%; }
|
|
||||||
.key-grid { grid-template-columns: minmax(0, 1fr); }
|
.key-grid { grid-template-columns: minmax(0, 1fr); }
|
||||||
.key-card { min-width: 0; overflow: hidden; }
|
.key-card { min-width: 0; overflow: hidden; }
|
||||||
.key-form { flex-wrap: wrap; }
|
.key-form { flex-wrap: wrap; }
|
||||||
|
|
@ -619,6 +618,63 @@
|
||||||
min-height: 44px;
|
min-height: 44px;
|
||||||
}
|
}
|
||||||
.key-form .btn { min-height: 44px; min-width: 44px; }
|
.key-form .btn { min-height: 44px; min-width: 44px; }
|
||||||
|
|
||||||
|
/* Phone map chrome: one column, no shared pixels */
|
||||||
|
#view-map.view.active {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.map-toolbar {
|
||||||
|
position: relative;
|
||||||
|
left: auto;
|
||||||
|
top: auto;
|
||||||
|
transform: none;
|
||||||
|
margin: 6px 8px 4px;
|
||||||
|
width: auto;
|
||||||
|
max-width: none;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
align-self: stretch;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.map-toolbar select {
|
||||||
|
flex: 1 1 8rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.map-stage {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
height: auto;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
#layer-panel {
|
||||||
|
top: 8px;
|
||||||
|
left: 8px;
|
||||||
|
width: min(268px, calc(100% - 68px));
|
||||||
|
max-height: calc(100% - 16px - 52px);
|
||||||
|
}
|
||||||
|
/* Collapsed by default so Africa isn't buried under the stack */
|
||||||
|
#layer-panel .lp-body { display: none; }
|
||||||
|
#layer-panel.is-open .lp-body { display: flex; }
|
||||||
|
#layer-panel:not(.is-open) .lp-caret { transform: rotate(-90deg); }
|
||||||
|
.map-hint { display: none; }
|
||||||
|
#dvr-bar {
|
||||||
|
left: 8px;
|
||||||
|
right: 8px;
|
||||||
|
bottom: 8px;
|
||||||
|
transform: none;
|
||||||
|
min-width: 0;
|
||||||
|
max-width: calc(100% - 16px);
|
||||||
|
width: calc(100% - 16px);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
#dvr-bar input[type=range] {
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 32px;
|
||||||
|
}
|
||||||
|
.leaflet-control-attribution { display: none !important; }
|
||||||
|
.leaflet-top.leaflet-right .leaflet-control-zoom {
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.tick-track { animation: none; }
|
.tick-track { animation: none; }
|
||||||
|
|
@ -2228,8 +2284,15 @@ function quantizeBBox(bbox, decimals = 1) {
|
||||||
}
|
}
|
||||||
function toggleLayerPanel() {
|
function toggleLayerPanel() {
|
||||||
const panel = document.getElementById('layer-panel');
|
const panel = document.getElementById('layer-panel');
|
||||||
|
const head = panel.querySelector('.lp-head');
|
||||||
|
if (window.matchMedia('(max-width: 820px)').matches) {
|
||||||
|
panel.classList.toggle('is-open');
|
||||||
|
const open = panel.classList.contains('is-open');
|
||||||
|
head.setAttribute('aria-expanded', String(open));
|
||||||
|
return;
|
||||||
|
}
|
||||||
panel.classList.toggle('collapsed');
|
panel.classList.toggle('collapsed');
|
||||||
panel.querySelector('.lp-head').setAttribute('aria-expanded', !panel.classList.contains('collapsed'));
|
head.setAttribute('aria-expanded', String(!panel.classList.contains('collapsed')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Basemap visibility / opacity ── */
|
/* ── Basemap visibility / opacity ── */
|
||||||
|
|
@ -3130,6 +3193,10 @@ initNav();
|
||||||
initSettings();
|
initSettings();
|
||||||
initMarketTicker();
|
initMarketTicker();
|
||||||
checkHealth();
|
checkHealth();
|
||||||
|
if (window.matchMedia('(max-width: 820px)').matches) {
|
||||||
|
const lpHead = document.querySelector('#layer-panel .lp-head');
|
||||||
|
if (lpHead) lpHead.setAttribute('aria-expanded', 'false');
|
||||||
|
}
|
||||||
initMap();
|
initMap();
|
||||||
// Ticker lives on the map HUD — load after overlays start so it does not
|
// Ticker lives on the map HUD — load after overlays start so it does not
|
||||||
// contend with the first bbox burst. Payload is slim (no article bodies).
|
// contend with the first bbox burst. Payload is slim (no article bodies).
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue