avoid selecting other file when routing

This commit is contained in:
vcoppe
2024-04-25 13:56:07 +02:00
parent 20af7c4e45
commit a23e73e82a
3 changed files with 14 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import type { GPXFile } from "gpx";
import { map, selectFiles } from "$lib/stores";
import { map, selectFiles, currentTool, Tool } from "$lib/stores";
import { get, type Writable } from "svelte/store";
import type mapboxgl from "mapbox-gl";
@@ -122,6 +122,9 @@ export class GPXMapLayer {
}
selectOnClick(e: any) {
if (get(currentTool) === Tool.ROUTING) {
return;
}
if (e.originalEvent.shiftKey) {
get(selectFiles).addSelect(get(this.file));
} else {