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

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