routing controls class

This commit is contained in:
vcoppe
2024-04-25 16:41:06 +02:00
parent 22de36d426
commit 7ef19adf53
9 changed files with 343 additions and 298 deletions

View File

@@ -28,6 +28,10 @@ export function getFileIndex(file: GPXFile): number {
export function applyToFile(file: GPXFile, callback: (file: GPXFile) => void, updateSelected: boolean) {
let store = getFileStore(file);
applyToFileStore(store, callback, updateSelected);
}
export function applyToFileStore(store: Writable<GPXFile>, callback: (file: GPXFile) => void, updateSelected: boolean) {
store.update($file => {
callback($file)
return $file;