bounds management

This commit is contained in:
vcoppe
2025-10-19 16:14:05 +02:00
parent 117c46341b
commit e57ced0ce7
12 changed files with 258 additions and 182 deletions

View File

@@ -32,6 +32,7 @@ import { get } from 'svelte/store';
import { settings } from '$lib/logic/settings';
import { getClosestLinePoint, getElevation } from '$lib/utils';
import { gpxStatistics } from '$lib/logic/statistics';
import { boundsManager } from './bounds';
// Generate unique file ids, different from the ones in the database
export function getFileIds(n: number) {
@@ -97,9 +98,8 @@ export async function loadFiles(list: FileList | File[]) {
}
let ids = fileActions.addMultiple(files);
// initTargetMapBounds(ids);
selection.selectFileWhenLoaded(ids[0]);
boundsManager.fitBoundsOnLoad(ids);
}
export async function loadFile(file: File): Promise<GPXFile | null> {