From 2cd8040a2f36355dac46c3590215999730c8e8c8 Mon Sep 17 00:00:00 2001 From: Garik Asplund <111464359+garikAsplund@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:33:55 -0800 Subject: [PATCH 1/2] Fix choropleth example (#688) Fixes #687 by switching away from wrongly implemented nullish coalescing operator. There are probably a couple different ways to do this, so this is just one that seems simple and effective. --- .../layerchart/src/routes/docs/examples/Choropleth/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte b/packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte index ee8d2a8bc..647320899 100644 --- a/packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte +++ b/packages/layerchart/src/routes/docs/examples/Choropleth/+page.svelte @@ -114,7 +114,7 @@ /> From 51e75aa7d0c7355ee4aaf329655fa5aebe14bc7e Mon Sep 17 00:00:00 2001 From: Scott Rhamy Date: Sun, 7 Dec 2025 18:01:14 -0500 Subject: [PATCH 2/2] padding-all-geo --- .../examples/components/GeoPath/animated-globe.svelte | 2 +- .../examples/components/GeoPath/sketchy-globe.svelte | 10 +++++++++- .../components/GeoPath/submarine-cables-globe.svelte | 2 +- .../components/GeoPath/translucent-globe.svelte | 2 ++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/src/examples/components/GeoPath/animated-globe.svelte b/docs/src/examples/components/GeoPath/animated-globe.svelte index e1f3a7d6d..e47fef053 100644 --- a/docs/src/examples/components/GeoPath/animated-globe.svelte +++ b/docs/src/examples/components/GeoPath/animated-globe.svelte @@ -133,7 +133,7 @@ }} tooltip={{ touchEvents: 'none' }} bind:context - padding={{ ...defaultChartPadding, left: 10, right: 10 }} + padding={{ ...defaultChartPadding, left: 5, right: 5 }} height={600} > {#snippet children()} diff --git a/docs/src/examples/components/GeoPath/sketchy-globe.svelte b/docs/src/examples/components/GeoPath/sketchy-globe.svelte index a91bde3ba..08b5385ba 100644 --- a/docs/src/examples/components/GeoPath/sketchy-globe.svelte +++ b/docs/src/examples/components/GeoPath/sketchy-globe.svelte @@ -4,7 +4,14 @@ import { feature } from 'topojson-client'; import { presimplify, simplify } from 'topojson-simplify'; - import { Chart, GeoPath, Graticule, Layer, type ChartContextValue } from 'layerchart'; + import { + Chart, + GeoPath, + Graticule, + Layer, + defaultChartPadding, + type ChartContextValue + } from 'layerchart'; import GeoPathGlobeControls2 from '$lib/components/controls/GeoPathGlobeControls2.svelte'; import { TimerState } from '@layerstack/svelte-state'; @@ -47,6 +54,7 @@ }} ondragstart={timer.stop} bind:context + padding={{ ...defaultChartPadding, top: 5 }} height={600} > diff --git a/docs/src/examples/components/GeoPath/submarine-cables-globe.svelte b/docs/src/examples/components/GeoPath/submarine-cables-globe.svelte index 0ddc374a8..074f4bb62 100644 --- a/docs/src/examples/components/GeoPath/submarine-cables-globe.svelte +++ b/docs/src/examples/components/GeoPath/submarine-cables-globe.svelte @@ -62,7 +62,7 @@ }} ondragstart={timer.stop} bind:context - padding={{ ...defaultChartPadding, top: 10 }} + padding={{ ...defaultChartPadding, top: 5 }} height={600} > {#snippet children({ context })} diff --git a/docs/src/examples/components/GeoPath/translucent-globe.svelte b/docs/src/examples/components/GeoPath/translucent-globe.svelte index 1e4ce0468..60a8f7e15 100644 --- a/docs/src/examples/components/GeoPath/translucent-globe.svelte +++ b/docs/src/examples/components/GeoPath/translucent-globe.svelte @@ -9,6 +9,7 @@ Graticule, Layer, Tooltip, + defaultChartPadding, type ChartContextValue } from 'layerchart'; import GeoPathTranslucentControls from '$lib/components/controls/GeoPathGlobeControls2.svelte'; @@ -50,6 +51,7 @@ }} ondragstart={timer.stop} bind:context + padding={{ ...defaultChartPadding, top: 5 }} height={600} > {#snippet children({ context })}