Skip to content

Commit

Permalink
add more map loading progress
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Dec 10, 2023
1 parent 5bb4d9b commit 560582d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/MapLoadingMain.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<script lang="ts">
export let progress: number | undefined;
import { tick } from 'svelte';
import { fade } from 'svelte/transition';
import { tick } from 'svelte';
$: progress === 40 &&
setTimeout(() => {
if (progress !== undefined && progress !== 100) {
progress = 60;
}
}, 2000);
const hideProgressBar = async () => {
await tick();
Expand All @@ -16,7 +22,7 @@
{#if progress !== undefined}
<div
out:fade={{ delay: 1000 }}
class="absolute left-1/2 top-1/2 z-[10000] -translate-x-1/2 -translate-y-1/2 space-y-2 rounded-lg border border-primary bg-teal p-4 dark:border-white dark:bg-dark"
class="absolute left-1/2 top-1/2 z-[10000] -translate-x-1/2 -translate-y-1/2 space-y-2 rounded-lg border border-primary bg-teal p-4 drop-shadow-2xl dark:border-white dark:bg-dark"
>
<p class="text-center text-primary dark:text-white">Loading map...</p>

Expand Down

0 comments on commit 560582d

Please sign in to comment.