mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
adaptive sticker scale
This commit is contained in:
parent
ef5cd0cdef
commit
a1c55befa2
5 changed files with 22 additions and 9 deletions
|
@ -11,4 +11,8 @@ export const getStyle = (oElm: any, strCssRule: string): string => {
|
|||
|
||||
export const getRandomColor = () => {
|
||||
return `hsla(${(Math.floor(Math.random() * 360))}, 100%, 50%, 0.4)`
|
||||
}
|
||||
}
|
||||
|
||||
export const getAdaptiveScale = (zoom: number): number => (
|
||||
Math.min(1, Math.max(0.4, 1 / (2 ** (13 - zoom))))
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue