Skip to content

Commit 01a9eab

Browse files
committed
[Timezones example] Add blur to daylight
1 parent d4eb463 commit 01a9eab

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • packages/layerchart/src/routes/docs/examples/Timezones

packages/layerchart/src/routes/docs/examples/Timezones/+page.svelte

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import Chart, { Svg } from '$lib/components/Chart.svelte';
1919
import GeoPath from '$lib/components/GeoPath.svelte';
2020
import Tooltip from '$lib/components/Tooltip.svelte';
21+
import Blur from '$lib/components/Blur.svelte';
2122
2223
import Preview from '$lib/docs/Preview.svelte';
2324
@@ -115,7 +116,7 @@
115116
let:tooltip
116117
>
117118
<Svg>
118-
<GeoPath geojson={{ type: 'Sphere' }} class="stroke-surface-content/30" />
119+
<GeoPath geojson={{ type: 'Sphere' }} class="stroke-surface-content/30" id="globe" />
119120
<Graticule class="stroke-surface-content/20" />
120121

121122
<GeoPath {geojson} id="clip" />
@@ -138,7 +139,14 @@
138139
{/each}
139140

140141
{#if showDaylight}
141-
<GeoCircle center={antipode(sun)} class="stroke-none fill-black/50 pointer-events-none" />
142+
<ClipPath useId="globe">
143+
<Blur>
144+
<GeoCircle
145+
center={antipode(sun)}
146+
class="stroke-none fill-black/50 pointer-events-none"
147+
/>
148+
</Blur>
149+
</ClipPath>
142150
{/if}
143151
</Svg>
144152

0 commit comments

Comments
 (0)