fix(dashboard): set initial size for map
This commit is contained in:
@@ -70,6 +70,15 @@ const Map = ({ markers }: Props) => {
|
|||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (ref.current) {
|
||||||
|
setSize({
|
||||||
|
width: ref.current.clientWidth,
|
||||||
|
height: ref.current.clientHeight,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
const adjustSizeBasedOnZoom = (size: number) => {
|
const adjustSizeBasedOnZoom = (size: number) => {
|
||||||
const minMultiplier = 1;
|
const minMultiplier = 1;
|
||||||
const maxMultiplier = 7;
|
const maxMultiplier = 7;
|
||||||
|
|||||||
Reference in New Issue
Block a user