mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
avoid selecting other file when routing
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user