mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-01 08:12:32 +00:00
routing shortcut
This commit is contained in:
@@ -88,7 +88,8 @@
|
||||
previousOverlays,
|
||||
distanceMarkers,
|
||||
directionMarkers,
|
||||
streetViewSource
|
||||
streetViewSource,
|
||||
routing
|
||||
} = settings;
|
||||
|
||||
let undoDisabled = derived(canUndo, ($canUndo) => !$canUndo);
|
||||
@@ -544,6 +545,9 @@
|
||||
} else if (e.key === 'F4') {
|
||||
$directionMarkers = !$directionMarkers;
|
||||
e.preventDefault();
|
||||
} else if (e.key === 'F5') {
|
||||
$routing = !$routing;
|
||||
e.preventDefault();
|
||||
} else if (
|
||||
e.key === 'ArrowRight' ||
|
||||
e.key === 'ArrowDown' ||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import Help from '$lib/components/Help.svelte';
|
||||
import Tooltip from '$lib/components/Tooltip.svelte';
|
||||
import Shortcut from '$lib/components/Shortcut.svelte';
|
||||
import {
|
||||
Bike,
|
||||
Footprints,
|
||||
@@ -25,7 +26,6 @@
|
||||
import { brouterProfiles, routingProfileSelectItem } from './Routing';
|
||||
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import { RoutingControls } from './RoutingControls';
|
||||
import mapboxgl from 'mapbox-gl';
|
||||
import { fileObservers } from '$lib/db';
|
||||
@@ -129,7 +129,10 @@
|
||||
</span>
|
||||
<Switch class="scale-90" bind:checked={$routing} />
|
||||
</Label>
|
||||
<span slot="tooltip">{$_('toolbar.routing.use_routing_tooltip')}</span>
|
||||
<span slot="tooltip" class="flex flex-row items-center">
|
||||
{$_('toolbar.routing.use_routing_tooltip')}
|
||||
<Shortcut key="F5" />
|
||||
</span>
|
||||
</Tooltip>
|
||||
{#if $routing}
|
||||
<div class="flex flex-col gap-3" in:slide>
|
||||
|
@@ -27,6 +27,7 @@ You can minimize the dialog to save space by clicking on <button><SquareArrowUpL
|
||||
|
||||
When routing is enabled, anchor points placed or moved on the map will be connected by a route calculated on the <a href="https://www.openstreetmap.org" target="_blank">OpenStreetMap</a> road network.
|
||||
Disable routing to connect anchor points with straight lines.
|
||||
This setting can also be toggled by pressing <kbd>F5</kbd>.
|
||||
|
||||
### <Bike size="16" class="inline-block" style="margin-bottom: 2px" /> Activity
|
||||
|
||||
|
Reference in New Issue
Block a user