fix elevation profile toggle

This commit is contained in:
vcoppe
2025-10-19 16:45:12 +02:00
parent 776c867c0b
commit ef310cc3cc
2 changed files with 5 additions and 2 deletions

View File

@@ -32,7 +32,7 @@
<Card.Root <Card.Root
class="h-full {orientation === 'vertical' class="h-full {orientation === 'vertical'
? 'min-w-40 sm:min-w-44 text-sm sm:text-base' ? 'min-w-40 sm:min-w-44 text-sm sm:text-base'
: 'w-full'} border-none shadow-none" : 'w-full'} border-none shadow-none p-0"
> >
<Card.Content <Card.Content
class="h-full flex {orientation === 'vertical' class="h-full flex {orientation === 'vertical'

View File

@@ -2,6 +2,7 @@ import mapboxgl from 'mapbox-gl';
import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder'; import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder';
import { get, writable, type Writable } from 'svelte/store'; import { get, writable, type Writable } from 'svelte/store';
import { settings } from '$lib/logic/settings'; import { settings } from '$lib/logic/settings';
import { tick } from 'svelte';
const { treeFileView, elevationProfile, bottomPanelSize, rightPanelSize, distanceUnits } = settings; const { treeFileView, elevationProfile, bottomPanelSize, rightPanelSize, distanceUnits } = settings;
@@ -204,7 +205,9 @@ export class MapboxGLMap {
resize() { resize() {
const map = get(this._map); const map = get(this._map);
if (map) { if (map) {
tick().then(() => {
map.resize(); map.resize();
});
} }
} }