diff --git a/src/frontend/src/Components/Filters.scss b/src/frontend/src/Components/Filters.scss index 6b73983b..ccdfe9ae 100644 --- a/src/frontend/src/Components/Filters.scss +++ b/src/frontend/src/Components/Filters.scss @@ -28,7 +28,7 @@ button.btn.open-filters { box-shadow: 0px 1.937px 4.358px 0px rgba(0, 0, 0, 0.13), 0px 0.363px 1.089px 0px rgba(0, 0, 0, 0.10); padding: 1rem; z-index: 21; - overflow-y: scroll; + overflow-y: auto; @media (min-width: 768px) { position: absolute; diff --git a/src/frontend/src/Components/Map.js b/src/frontend/src/Components/Map.js index b182c7ad..0e75bf59 100644 --- a/src/frontend/src/Components/Map.js +++ b/src/frontend/src/Components/Map.js @@ -298,9 +298,6 @@ export default function MapWrapper({ mapRef.current.once('loadstart', async () => { if (camera && !isPreview) { - popup.current.setPosition(handleCenter()); - popup.current.getElement().style.top = '40px'; - if (camera.event_type) { updateClickedEvent(camera); } else { @@ -415,9 +412,6 @@ export default function MapWrapper({ feature.setStyle(cameraStyles['active']); feature.setProperties({ clicked: true }, true); - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; - updateClickedCamera(feature); cameraPopupRef.current = popup; @@ -441,9 +435,6 @@ export default function MapWrapper({ } updateClickedEvent(feature); - - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; }; const ferryClickHandler = feature => { @@ -454,9 +445,6 @@ export default function MapWrapper({ feature.setStyle(ferryStyles['active']); feature.setProperties({ clicked: true }, true); updateClickedFerry(feature); - - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; }; const weatherClickHandler = feature => { @@ -467,9 +455,6 @@ export default function MapWrapper({ feature.setStyle(roadWeatherStyles['active']); feature.setProperties({ clicked: true }, true); updateClickedWeather(feature); - - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; }; const regionalClickHandler = feature => { @@ -480,9 +465,6 @@ export default function MapWrapper({ feature.setStyle(regionalStyles['active']); feature.setProperties({ clicked: true }, true); updateClickedRegional(feature); - - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; }; const restStopClickHandler = (feature) => { @@ -510,11 +492,6 @@ export default function MapWrapper({ } feature.setProperties({ clicked: true }, true); updateClickedRestStop(feature); - - popup.current.setPosition( - feature.getGeometry().getCoordinates(), - ); - popup.current.getElement().style.top = '40px'; } mapRef.current.on('click', async e => { @@ -1019,8 +996,6 @@ export default function MapWrapper({ }; function closePopup() { - popup.current.setPosition(undefined); - // camera is set to data structure rather than map feature if (clickedCameraRef.current && !clickedCameraRef.current.setStyle) { clickedCameraRef.current = mapLayers.current['highwayCams']