finishes trails page

This commit is contained in:
Christian Beutel
2024-02-05 22:37:11 +01:00
parent ec33723bdc
commit 5e4ccc59c0
12 changed files with 343 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import * as noUiSlider from "noUiSlider";
import "nouislider/dist/nouislider.css";
import { onMount } from "svelte";
import { createEventDispatcher, onMount } from "svelte";
export let minValue = 0;
export let maxValue = 100;
@@ -11,6 +11,8 @@
let sliderContainer: any;
const dispatch = createEventDispatcher();
onMount(() => {
const updateValues = (values: string[]) => {
currentMin = parseFloat(values[0]);
@@ -27,6 +29,10 @@
});
sliderContainer.noUiSlider.on("update", updateValues);
sliderContainer.noUiSlider.on("set", () => {
dispatch("set", [currentMin, currentMax]);
});
});
</script>