From a54b02422d69ee0453373439c61d977626037c85 Mon Sep 17 00:00:00 2001 From: NSUWAL123 Date: Wed, 11 Oct 2023 10:17:38 +0545 Subject: [PATCH 01/21] feat (projectDetails): map - for small screen, full screen map visible(only map visible) --- src/frontend/src/components/OpenLayersMap.jsx | 14 +- src/frontend/src/styles/home.scss | 2 +- src/frontend/src/views/MainView.jsx | 18 +- src/frontend/src/views/ProjectDetails.jsx | 423 +++++++++--------- 4 files changed, 245 insertions(+), 212 deletions(-) diff --git a/src/frontend/src/components/OpenLayersMap.jsx b/src/frontend/src/components/OpenLayersMap.jsx index aad3c32eb1..bcd7641b83 100755 --- a/src/frontend/src/components/OpenLayersMap.jsx +++ b/src/frontend/src/components/OpenLayersMap.jsx @@ -21,6 +21,8 @@ import Button from './common/Button'; import { ProjectActions } from '../store/slices/ProjectSlice'; import TaskSectionModal from './ProjectDetails/TaskSectionPopup'; import VectorLayer from 'ol/layer/Vector'; +import WindowDimension from '../hooks/WindowDimension'; + let currentLocationLayer = null; const OpenLayersMap = ({ defaultTheme, @@ -40,6 +42,8 @@ const OpenLayersMap = ({ const [currentLocLayer, setCurrentLocLayer] = useState(null); const dispatch = CoreModules.useAppDispatch(); const taskModalStatus = CoreModules.useAppSelector((state) => state.project.taskModalStatus); + const { windowSize } = WindowDimension(); + function elastic(t) { return Math.pow(2, -10 * t) * Math.sin(((t - 0.075) * (2 * Math.PI)) / 0.3) + 1; } @@ -322,13 +326,17 @@ const OpenLayersMap = ({ }, [map, currentLocLayer]); return ( - +
{/*