fix(geoportal): use absolute inset-0 on MapViewer wrapper (fixes 0-height canvas)
h-full (height:100%) doesn't propagate through absolutely positioned parents. The MapLibre container had width=1065 but height=0. Using absolute inset-0 on the wrapper fills the parent directly via positioning instead of percentage height. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -570,7 +570,7 @@ export const MapViewer = forwardRef<MapViewerHandle, MapViewerProps>(
|
|||||||
}, [center, zoom, mapReady]);
|
}, [center, zoom, mapReady]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("relative w-full h-full min-h-[400px]", className)}>
|
<div className={cn("absolute inset-0", className)}>
|
||||||
<div ref={containerRef} className="absolute inset-0" />
|
<div ref={containerRef} className="absolute inset-0" />
|
||||||
{!mapReady && (
|
{!mapReady && (
|
||||||
<div className="absolute inset-0 flex items-center justify-center bg-muted/50">
|
<div className="absolute inset-0 flex items-center justify-center bg-muted/50">
|
||||||
|
|||||||
Reference in New Issue
Block a user