feat: added zoom out cap, improved legend padding on mobile

This commit is contained in:
William Grant 2023-02-10 12:42:22 +11:00
parent 1ec08b36d4
commit 504469869c
1 changed files with 19 additions and 7 deletions

View File

@ -143,6 +143,15 @@ export default function Roadmap() {
: isEnormous : isEnormous
? 0.6 ? 0.6
: 0.25, : 0.25,
minZoom: isMobile
? 0.07
: isTablet
? 0.125
: isHuge
? 0.12
: isEnormous
? 0.2
: 0.1,
autocenter: false, autocenter: false,
initialX: isMobile initialX: isMobile
? -900 ? -900
@ -172,7 +181,15 @@ export default function Roadmap() {
pz.dispose(); pz.dispose();
} }
}; };
}, [isMobile, isTablet, isHuge, isEnormous, loaded, startup, showExplanation]); }, [
isMobile,
isTablet,
isHuge,
isEnormous,
loaded,
startup,
showExplanation,
]);
return ( return (
<> <>
@ -205,12 +222,7 @@ export default function Roadmap() {
/> />
{!(isMobile && showExplanation) && loaded && ( {!(isMobile && showExplanation) && loaded && (
<> <>
<div <div className={classNames('z-10 absolute right-6 bottom-6')}>
className={classNames(
'z-10 absolute right-4 bottom-4',
'desktop:right-6 desktop:bottom-6',
)}
>
{/* eslint-disable @next/next/no-img-element */} {/* eslint-disable @next/next/no-img-element */}
<img <img
src={'/svgs/roadmap-key.svg'} src={'/svgs/roadmap-key.svg'}