mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-05 18:02:55 +00:00
add routing docs
This commit is contained in:
@@ -102,7 +102,10 @@
|
||||
</Button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex flex-col gap-3 w-80" in:flyAndScale={{ x: -2, y: 0, duration: 50 }}>
|
||||
<div
|
||||
class="flex flex-col gap-3 w-full max-w-80 {$$props.class ?? ''}"
|
||||
in:flyAndScale={{ x: -2, y: 0, duration: 50 }}
|
||||
>
|
||||
<div class="grow flex flex-col gap-3">
|
||||
<Tooltip>
|
||||
<Label slot="data" class="w-full flex flex-row justify-between items-center gap-2">
|
||||
|
@@ -2,7 +2,7 @@ import type { Coordinates } from "gpx";
|
||||
import { TrackPoint, distance } from "gpx";
|
||||
import { derived, get, writable } from "svelte/store";
|
||||
import { settings } from "$lib/db";
|
||||
import { _, locale } from "svelte-i18n";
|
||||
import { _, isLoading, locale } from "svelte-i18n";
|
||||
import { map } from "$lib/stores";
|
||||
|
||||
const { routing, routingProfile, privateRoads } = settings;
|
||||
@@ -17,12 +17,12 @@ export const brouterProfiles: { [key: string]: string } = {
|
||||
railway: 'rail'
|
||||
};
|
||||
export const routingProfileSelectItem = writable({
|
||||
value: 'bike',
|
||||
value: '',
|
||||
label: ''
|
||||
});
|
||||
|
||||
derived([routingProfile, locale], ([profile, l]) => [profile, l]).subscribe(([profile, l]) => {
|
||||
if (profile !== get(routingProfileSelectItem).value && l !== null) {
|
||||
derived([routingProfile, locale, isLoading], ([profile, l, i]) => [profile, l, i]).subscribe(([profile, l, i]) => {
|
||||
if (!i && profile !== get(routingProfileSelectItem).value && l !== null) {
|
||||
routingProfileSelectItem.update((item) => {
|
||||
item.value = profile;
|
||||
item.label = get(_)(`toolbar.routing.activities.${profile}`);
|
||||
|
Reference in New Issue
Block a user