This commit is contained in:
vcoppe
2024-05-23 11:21:57 +02:00
parent f202b6c196
commit 51495e9bd1
16 changed files with 211 additions and 148 deletions

View File

@@ -4,7 +4,9 @@
import { get } from 'svelte/store';
import WaypointPopup from './WaypointPopup.svelte';
import { fileObservers } from '$lib/db';
import { selection } from '$lib/components/file-list/Selection';
import { DistanceMarkers } from './DistanceMarkers';
let distanceMarkers: DistanceMarkers;
$: if ($map && $fileObservers) {
gpxLayers.update(($layers) => {
@@ -25,13 +27,9 @@
});
}
$: $selection.forEach((item) => {
let fileId = item.getFileId();
// TODO move more precise selection to front?
if ($gpxLayers.has(fileId)) {
$gpxLayers.get(fileId)?.moveToFront();
}
});
$: if ($map) {
distanceMarkers = new DistanceMarkers(get(map));
}
</script>
<WaypointPopup />