This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
forked from pixelaw/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
89 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
.loadingContainer { | ||
@apply fixed inset-0 z-50 flex items-center justify-center bg-primary/90; | ||
@apply fixed inset-0 z-50 flex items-center justify-center bg-bg-primary/90; | ||
} | ||
|
||
.loadingText { | ||
@apply text-3xl font-bold text-white; | ||
animation: loadingAnimation 1s steps(4, end) infinite; | ||
} | ||
|
||
@keyframes loadingAnimation { | ||
0% { | ||
content: 'Loading.'; | ||
} | ||
25% { | ||
content: 'Loading..'; | ||
} | ||
50% { | ||
content: 'Loading...'; | ||
} | ||
75% { | ||
content: 'Loading...'; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import styles from './Loading.module.css'; | ||
|
||
const Loading = () => ( | ||
<div className={styles.loadingContainer}> | ||
<span className={styles.loadingText}>Loading...</span> | ||
</div> | ||
); | ||
const Loading: React.FC = () => { | ||
const [loadingText, setLoadingText] = useState('Loading.'); | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setLoadingText(prev => { | ||
if (prev === 'Loading...') { | ||
return 'Loading.'; | ||
} | ||
return prev + '.'; | ||
}); | ||
}, 500); | ||
|
||
return () => clearInterval(interval); | ||
}, []); | ||
|
||
return ( | ||
<div className={styles.loadingContainer}> | ||
<span className={styles.loadingText}>{loadingText}</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export const ZOOM_TILEMODE = 2699; | ||
export const ZOOM_TILEMODE = 1799; | ||
export const ZOOM_FACTOR = 100; | ||
export const ZOOM_MAX = 10000; // 100 pixels per cell side | ||
export const ZOOM_MIN = 2700; // 0.5 pixels per cell side | ||
export const ZOOM_MIN = 1800; // 0.5 pixels per cell side | ||
// export const ZOOM_MIN = 50 // 0.5 pixels per cell side | ||
export const ZOOM_SCALEFACTOR = 1.1; |