diff --git a/src/frontend/src/components/MapComponent/OpenLayersComponent/AsyncPopup/AsyncPopup.tsx b/src/frontend/src/components/MapComponent/OpenLayersComponent/AsyncPopup/AsyncPopup.tsx index 6fd3d09511..0c9be3a556 100644 --- a/src/frontend/src/components/MapComponent/OpenLayersComponent/AsyncPopup/AsyncPopup.tsx +++ b/src/frontend/src/components/MapComponent/OpenLayersComponent/AsyncPopup/AsyncPopup.tsx @@ -50,6 +50,11 @@ const AsyncPopup = ({ element: popupRef.current, positioning: 'center-center', id: popupId, + autoPan: { + animation: { + duration: 250, + }, + }, }); setOverlay(overlayInstance); }, [map, popupRef]); @@ -98,7 +103,7 @@ const AsyncPopup = ({ if (!overlay) return; map.on(showOnHover, (evt) => { - map.updateSize(); + // map.updateSize(); overlay.setPosition(undefined); setPopupHTML(''); setProperties(null); diff --git a/src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx b/src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx index ed51b1b5a7..efd84eb764 100644 --- a/src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx +++ b/src/frontend/src/components/ProjectDetailsV2/TaskSectionPopup.tsx @@ -56,7 +56,7 @@ const TaskSectionPopup = ({ taskId, body, feature }: TaskSectionPopupPropType) =
{ dispatch(CoreModules.TaskActions.SetSelectedTask(properties.uid)); dispatch(ProjectActions.ToggleTaskModalStatus(true)); - if (windowSize.width < 768) { + if (windowSize.width < 768 && map.getView().getZoom() < 17) { map.getView().fit(extent, { padding: [10, 20, 300, 20], }); - } else { + } else if (windowSize.width > 768 && map.getView().getZoom() < 17) { map.getView().fit(extent, { padding: [20, 350, 50, 10], }); @@ -388,7 +388,7 @@ const Home = () => { zIndex={5} /> )} - +
{window.DeviceMotionEvent}