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 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;
@@ -10,6 +10,8 @@
let sliderContainer: any;
const dispatch = createEventDispatcher();
onMount(() => {
const updateValues = (values: string[]) => {
currentValue = parseFloat(values[0]);
@@ -25,6 +27,10 @@
});
sliderContainer.noUiSlider.on("update", updateValues);
sliderContainer.noUiSlider.on("set", () => {
dispatch("set", currentValue);
});
});
</script>