fix(geo): AOI map blank — hardcode height 520px, decouple от flex/vh

Console показывает no errors AND no tile requests. Это значит
L.map(div) либо не вызывается, либо вызывается с 0×0 контейнером
(Leaflet не запрашивает 0 tiles при 0-viewport).

Гипотеза: 'flex-1' + 'height: 60vh' конфликтуют с Modal transform
animation (translate-y-2 scale-[0.98] во время fade-in). На
момент useEffect div.clientHeight иногда читался 0 несмотря на
inline style.

Decouple полностью: hardcode '520px' pixel height, display:block,
width:100%. Не использует flex layout. Стабильно >0 на любом
viewport.
This commit is contained in:
Zimin A.N.
2026-05-06 22:05:22 +03:00
parent 5534b9d479
commit 325838cd12
@@ -180,11 +180,12 @@ export const AoiPickerDialog = ({ isOpen, onClose, onApply, initial }: Props) =>
<div <div
ref={mapDivRef} ref={mapDivRef}
className="flex-1 rounded-sm border border-regolith" className="rounded-sm border border-regolith"
// Inline height — Leaflet требует non-zero containerSize в момент // Hardcoded pixel height + block display — full decoupling от flex/vh.
// L.map() create(). flex-1 не гарантирует высоту до layout pass; // Leaflet требует non-zero containerSize в момент L.map() create().
// explicit 420px минимум защищает от blank карты. // 60vh раньше иногда читался как 0 во время Modal transform animation;
style={{ minHeight: 420, height: '60vh' }} // 520px стабильно.
style={{ display: 'block', width: '100%', height: 520 }}
aria-label={t('aoi.dialog.mapAriaLabel')} aria-label={t('aoi.dialog.mapAriaLabel')}
/> />