feat: add debug query param
This commit is contained in:
parent
66d32683fc
commit
728bc1abe1
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PageData } from "./$types";
|
import type { PageData } from "./$types";
|
||||||
|
import { page } from "$app/stores";
|
||||||
import L from "leaflet";
|
import L from "leaflet";
|
||||||
|
|
||||||
import "leaflet/dist/leaflet.css";
|
import "leaflet/dist/leaflet.css";
|
||||||
|
@ -12,6 +13,8 @@
|
||||||
|
|
||||||
let { data }: Props = $props();
|
let { data }: Props = $props();
|
||||||
|
|
||||||
|
const hidden = !$page.url.searchParams.has("debug");
|
||||||
|
|
||||||
const lignes = data.lines;
|
const lignes = data.lines;
|
||||||
const point = L.latLng(45.75388713, 4.84715287);
|
const point = L.latLng(45.75388713, 4.84715287);
|
||||||
|
|
||||||
|
@ -64,11 +67,11 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="banner">
|
<div class="banner" {hidden}>
|
||||||
<span>distance: {distance}, points: {points}</span>
|
<span>distance: {distance}, points: {points}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="banner">
|
<div class="banner" {hidden}>
|
||||||
<label>lines: <input type="checkbox" bind:checked={lines} /></label>
|
<label>lines: <input type="checkbox" bind:checked={lines} /></label>
|
||||||
<label>labels: <input type="checkbox" bind:checked={labels} /></label>
|
<label>labels: <input type="checkbox" bind:checked={labels} /></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue