parent
84c975aa6b
commit
c107ce6d5d
7 changed files with 67 additions and 7 deletions
@ -0,0 +1,14 @@ |
|||||||
|
export function ReadonlyEditor(props: any) { |
||||||
|
return ( |
||||||
|
<div className="fixed bottom-0 left-0 right-0 top-0 z-[9999] border bg-white p-5 text-black"> |
||||||
|
<h2 className="mb-2 text-xl font-semibold">Private Component</h2> |
||||||
|
<p className="mb-4"> |
||||||
|
Renderer is a private component. If you are a collaborator and have |
||||||
|
access to it. Run the following command: |
||||||
|
</p> |
||||||
|
<code className="mt-5 rounded-md bg-gray-800 p-2 text-white"> |
||||||
|
npm run generate-renderer |
||||||
|
</code> |
||||||
|
</div> |
||||||
|
); |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
export function isAndroid(): boolean { |
||||||
|
return ( |
||||||
|
typeof navigator !== 'undefined' && /android/i.test(navigator.userAgent) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
export function isSmallIOS(): boolean { |
||||||
|
return ( |
||||||
|
typeof navigator !== 'undefined' && /iPhone|iPod/.test(navigator.userAgent) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
export function isLargeIOS(): boolean { |
||||||
|
return ( |
||||||
|
typeof navigator !== 'undefined' && |
||||||
|
(/iPad/.test(navigator.userAgent) || |
||||||
|
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
export function isIOS(): boolean { |
||||||
|
return isSmallIOS() || isLargeIOS(); |
||||||
|
} |
||||||
|
|
||||||
|
export function isMobile(): boolean { |
||||||
|
return isAndroid() || isIOS(); |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
export const INITIAL_MOBILE_ZOOM = 0.45; |
||||||
|
export const MINIMUM_MOBILE_ZOOM = 0.2; |
||||||
|
export const INITIAL_DESKTOP_ZOOM = 1; |
||||||
|
export const MINIMUM_DESKTOP_ZOOM = 0.75; |
||||||
|
|
||||||
|
export function centerRoadmap(options: any) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
export function calculateDimensions(options: any) { |
||||||
|
return { |
||||||
|
x: 0, |
||||||
|
y: 0, |
||||||
|
measuredWidth: 0, |
||||||
|
measuredHeight: 0, |
||||||
|
}; |
||||||
|
} |
Loading…
Reference in new issue