diff --git a/web/src/lib/components/base/double_slider.svelte b/web/src/lib/components/base/double_slider.svelte index 55c8098c..f3a9ead7 100644 --- a/web/src/lib/components/base/double_slider.svelte +++ b/web/src/lib/components/base/double_slider.svelte @@ -9,6 +9,7 @@ currentMin?: any; currentMax?: any; onset?: (data: [number, number]) => void; + onupdate?: (data: [number, number]) => void; } let { @@ -17,6 +18,7 @@ currentMin = $bindable(minValue), currentMax = $bindable(maxValue), onset, + onupdate, }: Props = $props(); let sliderContainer: any = $state(); @@ -25,6 +27,7 @@ const updateValues = (values: string[]) => { currentMin = parseFloat(values[0]); currentMax = parseFloat(values[1]); + onupdate?.([currentMin, currentMax]); }; noUiSlider.create(sliderContainer, { diff --git a/web/src/lib/components/trail/map_with_elevation_maplibre.svelte b/web/src/lib/components/trail/map_with_elevation_maplibre.svelte index 0cad2198..a5943b9d 100644 --- a/web/src/lib/components/trail/map_with_elevation_maplibre.svelte +++ b/web/src/lib/components/trail/map_with_elevation_maplibre.svelte @@ -716,6 +716,7 @@ if (!map) { return; } + hideWaypoints(); activeTrail ??= 0; map.getCanvas().style.cursor = "crosshair"; if (trails[activeTrail]) { @@ -727,6 +728,7 @@ if (!map) { return; } + showWaypoints(); map.getCanvas().style.cursor = "inherit"; if (activeTrail !== null && trails[activeTrail] && !clusterTrails) { diff --git a/web/src/lib/components/trail/route_editor.svelte b/web/src/lib/components/trail/route_editor.svelte new file mode 100644 index 00000000..e81e2abf --- /dev/null +++ b/web/src/lib/components/trail/route_editor.svelte @@ -0,0 +1,411 @@ + + +
+ {$_("walking-speed")} +
++ {formatSpeed( + options.pedestrianOptions.walking_speed! / 3.6, + )} +
+{$_("use-hills")}
++ {options.pedestrianOptions.use_hills?.toFixed(2)} +
++ {$_("max-hiking-difficulty")} +
++ {options.pedestrianOptions.max_hiking_difficulty?.toFixed( + 0, + )} +
++ {$_("cycling-speed")} +
++ {formatSpeed( + options.bicycleOptions.cycling_speed! / 3.6, + )} +
+{$_("use-hills")}
++ {options.bicycleOptions.use_hills?.toFixed(2)} +
+{$_("use-roads")}
++ {options.bicycleOptions.use_roads?.toFixed(2)} +
++ {$_("avoid-bad-surfaces")} +
++ {options.bicycleOptions.avoid_bad_surfaces?.toFixed( + 2, + )} +
++ {$_("fixed-speed")} +
++ {formatSpeed( + options.autoOptions.fixed_speed! / 3.6, + )} +
+{$_("top-speed")}
++ {formatSpeed(options.autoOptions.top_speed! / 3.6)} +
++ {$_("car")} + {$_("width")} +
++ {options.autoOptions.width?.toFixed(1)} +
++ {$_("car")} + {$_("height")} +
++ {options.autoOptions.height?.toFixed(1)} +
++ {$_("recalculating-elevation-data-hint")} +
+{$_("walking-speed")}
-- {formatSpeed( - options.pedestrianOptions.walking_speed! / 3.6, - )} -
-{$_("use-hills")}
-- {options.pedestrianOptions.use_hills?.toFixed(2)} -
-{$_("max-hiking-difficulty")}
-- {options.pedestrianOptions.max_hiking_difficulty?.toFixed( - 0, - )} -
-{$_("cycling-speed")}
-- {formatSpeed(options.bicycleOptions.cycling_speed! / 3.6)} -
-{$_("use-hills")}
-- {options.bicycleOptions.use_hills?.toFixed(2)} -
-{$_("use-roads")}
-- {options.bicycleOptions.use_roads?.toFixed(2)} -
-{$_("avoid-bad-surfaces")}
-- {options.bicycleOptions.avoid_bad_surfaces?.toFixed(2)} -
-{$_("fixed-speed")}
-- {formatSpeed(options.autoOptions.fixed_speed! / 3.6)} -
-{$_("top-speed")}
-- {formatSpeed(options.autoOptions.top_speed! / 3.6)} -
-{$_("car")} {$_("width")}
-- {options.autoOptions.width?.toFixed(1)} -
-{$_("car")} {$_("height")}
-- {options.autoOptions.height?.toFixed(1)} -
-