mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-10-16 04:18:19 +00:00
progress
This commit is contained in:
@@ -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 />
|
||||
|
Reference in New Issue
Block a user