mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
add routing docs
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
$: validSelection = $selection.size > 0;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-80">
|
||||
<div class="flex flex-col gap-3 w-full max-w-80 items-center">
|
||||
<fieldset class="flex flex-col gap-3">
|
||||
<Label class="flex flex-row items-center gap-[6.4px] h-3">
|
||||
<Checkbox bind:checked={deleteTrackpoints} class="scale-90" />
|
||||
@@ -150,6 +150,7 @@
|
||||
</fieldset>
|
||||
<Button
|
||||
variant="outline"
|
||||
class="w-full"
|
||||
disabled={!validSelection || rectangleCoordinates.length != 2}
|
||||
on:click={() => {
|
||||
dbUtils.cleanSelection(
|
||||
|
@@ -37,7 +37,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-80">
|
||||
<div class="flex flex-col gap-3 w-full max-w-80">
|
||||
<Button variant="outline" disabled={!validSelection} on:click={dbUtils.extractSelection}>
|
||||
<Ungroup size="16" class="mr-1" />
|
||||
{$_('toolbar.extract.button')}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
let mergeType = MergeType.TRACES;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-80">
|
||||
<div class="flex flex-col gap-3 w-full max-w-80">
|
||||
<RadioGroup.Root bind:value={mergeType}>
|
||||
<Label class="flex flex-row items-center gap-2 leading-5">
|
||||
<RadioGroup.Item value={MergeType.TRACES} />
|
||||
|
@@ -147,7 +147,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-80">
|
||||
<div class="flex flex-col gap-3 w-full max-w-80">
|
||||
<div class="p-2">
|
||||
<Slider bind:value={sliderValue} min={0} max={100} step={1} />
|
||||
</div>
|
||||
|
@@ -76,7 +76,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-80">
|
||||
<div class="flex flex-col gap-3 w-full max-w-80">
|
||||
<div class="p-2">
|
||||
<Slider bind:value={sliderValues} max={maxSliderValue} step={1} disabled={!validSelection} />
|
||||
</div>
|
||||
|
@@ -162,7 +162,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-3 w-96">
|
||||
<div class="flex flex-col gap-3 w-full max-w-96">
|
||||
<fieldset class="flex flex-col gap-2">
|
||||
<Label for="name">{$_('menu.metadata.name')}</Label>
|
||||
<Input bind:value={name} id="name" class="font-semibold h-8" />
|
||||
|
@@ -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