feat(web): auto fit bounds for map modal (#20345)

This commit is contained in:
Dag Stuan
2025-07-28 18:36:37 +02:00
committed by GitHub
parent d34670bae6
commit 66ea75072d
2 changed files with 19 additions and 13 deletions

View File

@@ -8,10 +8,9 @@
type Props = {
onClose: (assetIds?: string[]) => void;
mapMarkers: MapMarkerResponseDto[];
zoom?: number;
};
let { onClose, mapMarkers, zoom }: Props = $props();
let { onClose, mapMarkers }: Props = $props();
</script>
<Modal title={$t('map')} size="giant" {onClose}>
@@ -26,15 +25,7 @@
</div>
{/await}
{:then { default: Map }}
<Map
center={undefined}
{zoom}
clickable={false}
{mapMarkers}
onSelect={onClose}
showSettings={false}
rounded
/>
<Map clickable={false} {mapMarkers} onSelect={onClose} showSettings={false} rounded autoFitBounds />
{/await}
</div>
</div>