diff --git a/src/lib/charts/CanvasChart.svelte b/src/lib/charts/CanvasChart.svelte
index 0962550..50aac1d 100644
--- a/src/lib/charts/CanvasChart.svelte
+++ b/src/lib/charts/CanvasChart.svelte
@@ -86,6 +86,21 @@
delete groups[name];
}
}
+
+ /**
+ * Drive the shared crosshair of a chart group from the outside (e.g. hovering
+ * the hourly table). `time` is epoch seconds, or null to clear. No-op if no
+ * chart in that group is currently mounted.
+ */
+ export function setGroupHover(name: string, time: number | null): void {
+ const state = groups[name];
+ if (state) state.hover = time;
+ }
+
+ /** Current shared zoom range of a group (null = full range), reactive. */
+ export function groupRange(name: string): { start: number; end: number } | null {
+ return groups[name]?.range ?? null;
+ }
-
+
@@ -100,18 +103,41 @@
.chart-bleed {
/* Bleed exactly into the page padding on mobile (main has p-5 =
1.25rem) for edge-to-edge charts, and a bit past the content
- column on md+ (main has 2rem padding) for extra readability.
- Charts narrower than their min-width scroll sideways. */
+ column on md+ (main has 2rem padding) for extra readability. */
margin-left: -1.25rem;
margin-right: -1.25rem;
overflow-x: auto;
}
+ .chart-bleed.no-bleed {
+ margin-left: 0;
+ margin-right: 0;
+ }
+
+ .chart-container {
+ min-width: var(--chart-min-width);
+ }
+
+ /* Mobile: fit the chart to the viewport instead of forcing a min-width
+ sideways scroll (which fights touch inspection). Pinch to zoom for detail. */
+ @media (max-width: 767px) {
+ .chart-container {
+ min-width: 0;
+ }
+ .chart-bleed {
+ overflow-x: hidden;
+ }
+ }
+
@media (min-width: 768px) {
.chart-bleed {
margin-left: -1.5rem;
margin-right: -1.5rem;
}
+ .chart-bleed.no-bleed {
+ margin-left: 0;
+ margin-right: 0;
+ }
}
.chart-content {
diff --git a/src/lib/components/location/location-search.svelte b/src/lib/components/location/location-search.svelte
index cb70699..f757b68 100644
--- a/src/lib/components/location/location-search.svelte
+++ b/src/lib/components/location/location-search.svelte
@@ -1,7 +1,12 @@
+{#snippet locationRow(location: GeoLocation)}
+ {@const fav = favKeys.has(locationKey(location))}
+
+ {#each $storedFavoriteLocations as loc (locationKey(loc))}
+ {@render locationRow(loc)}
+ {/each}
+
+ {/if}
+ {#if recentToShow.length > 0}
+
+ Recent
+
+
+ {#each recentToShow as loc (locationKey(loc))}
+ {@render locationRow(loc)}
+ {/each}
+
+ {/if}
+ {:else}
@@ -200,62 +301,25 @@
Start typing to search or use GPS to detect your position
- {:else}
-
-
- No locations found for "{searchQuery}". Try a different term.
-
-
{/if}
- {:else if !results.results}
+ {:else if results.results && results.results.length > 0}
+
+ {#each results.results as location, i (i)}
+ {@render locationRow(location)}
+ {/each}
+
+ {:else if results.results}
+
+
+ No locations found for "{searchQuery}". Try a different term.
+
+
+ {:else}
No locations found
- {:else}
-
- {#each results.results || [] as location, i (i)}
-
- {/each}
-