From 53a20a997580a04bfa1061ba9d468e272daafbd8 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Wed, 4 Sep 2024 17:43:59 +0100 Subject: [PATCH] Group some sidebar controls, and stop using extra divs around everything, now that pico does reasonable things --- web/src/App.svelte | 23 ++++--- web/src/ClippedPBFs.svelte | 24 ++++--- web/src/CostFunction.svelte | 40 +++++------ web/src/EdgeCostApp.svelte | 61 ++++++++--------- web/src/InteractiveApp.svelte | 39 +++++------ web/src/SidebarControls.svelte | 117 +++++++++++++++------------------ web/src/StreetView.svelte | 18 +++-- 7 files changed, 155 insertions(+), 167 deletions(-) diff --git a/web/src/App.svelte b/web/src/App.svelte index 278cf79..9ed27a1 100644 --- a/web/src/App.svelte +++ b/web/src/App.svelte @@ -55,15 +55,17 @@
- -
+
+ Load a file + + -
+ + {#if outputMetadata} {/if} diff --git a/web/src/ClippedPBFs.svelte b/web/src/ClippedPBFs.svelte index 1c9233d..555a370 100644 --- a/web/src/ClippedPBFs.svelte +++ b/web/src/ClippedPBFs.svelte @@ -2,16 +2,14 @@ export let example: string; -
- -
+ diff --git a/web/src/CostFunction.svelte b/web/src/CostFunction.svelte index 5006af2..aec214e 100644 --- a/web/src/CostFunction.svelte +++ b/web/src/CostFunction.svelte @@ -74,17 +74,15 @@ $: setCost(costChoice); -
- -
+ @@ -156,15 +154,13 @@ {/each} -
- -
+ {/if} diff --git a/web/src/EdgeCostApp.svelte b/web/src/EdgeCostApp.svelte index 462cec4..ec77837 100644 --- a/web/src/EdgeCostApp.svelte +++ b/web/src/EdgeCostApp.svelte @@ -215,31 +215,32 @@
- - - (loading = e.detail)} - on:error={(e) => (loading = e.detail)} - /> +
+ Change areas + + + (loading = e.detail)} + on:error={(e) => (loading = e.detail)} + /> +
{#if network} -
-
- -
+ + {#if colorBy == "lts"} +

Note: LTS model from {/if} -

-
+ + + {/if}
diff --git a/web/src/InteractiveApp.svelte b/web/src/InteractiveApp.svelte index f63f95e..e5d894b 100644 --- a/web/src/InteractiveApp.svelte +++ b/web/src/InteractiveApp.svelte @@ -115,27 +115,28 @@
- - - (loading = e.detail)} - on:error={(e) => (loading = e.detail)} - /> +
+ Change areas + + + (loading = e.detail)} + on:error={(e) => (loading = e.detail)} + /> +
{#if network} -
- -
+ {/if} diff --git a/web/src/SidebarControls.svelte b/web/src/SidebarControls.svelte index 25eb42d..dff57c7 100644 --- a/web/src/SidebarControls.svelte +++ b/web/src/SidebarControls.svelte @@ -27,20 +27,20 @@

{outputMetadata.config.requests.description}

-
- -
-
+ + +
+ Route network layer + -
-
+ -
-
-
-
+ -
-
-
-
+ -
-{#if outputMetadata.config.elevation_geotiff} -
+ {#if outputMetadata.config.elevation_geotiff} -
-{/if} + {/if} -{#if $showSlope} - -{:else} -
- -

- Note: LTS model from - BikeOttawa - -

-{/if} + {#if $showSlope} + + {:else} + +

+ Note: LTS model from + BikeOttawa + +

+ {/if} +
diff --git a/web/src/StreetView.svelte b/web/src/StreetView.svelte index 516f3d5..555dc6d 100644 --- a/web/src/StreetView.svelte +++ b/web/src/StreetView.svelte @@ -53,14 +53,12 @@ StreetView {#if enabled} -
- - -
+ + {/if}