From a8a995d72e9daa6310f79df2a6f54e109fbbe0ee Mon Sep 17 00:00:00 2001 From: Clinton Lunn Date: Sat, 16 Nov 2024 15:33:38 -0700 Subject: [PATCH] refactor: use onmoveend instead of onmove to handle camera in url --- src/components/maps/GlobalMap.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/maps/GlobalMap.tsx b/src/components/maps/GlobalMap.tsx index 09725f0e3..908e695df 100644 --- a/src/components/maps/GlobalMap.tsx +++ b/src/components/maps/GlobalMap.tsx @@ -79,7 +79,7 @@ export const GlobalMap: React.FC = ({ }, fState) } - const onMove = useCallback((e: ViewStateChangeEvent) => { + const onMoveEnd = useCallback((e: ViewStateChangeEvent) => { if ((mapInstance === null) || e.viewState === null || (onCameraMovement === undefined)) return onCameraMovement({ center: { @@ -218,7 +218,7 @@ export const GlobalMap: React.FC = ({ id='global-map' onLoad={onLoad} onDragStart={() => setCursor('move')} - onMove={onMove} + onMoveEnd={onMoveEnd} onDragEnd={() => setCursor('default')} onMouseEnter={onHover} onMouseLeave={() => {