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 08f23f08..9808b139 100644 --- a/src/frontend/src/Components/Map.js +++ b/src/frontend/src/Components/Map.js @@ -297,9 +297,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 { @@ -414,9 +411,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; @@ -440,9 +434,6 @@ export default function MapWrapper({ } updateClickedEvent(feature); - - popup.current.setPosition(feature.getGeometry().getCoordinates()); - popup.current.getElement().style.top = '40px'; }; const ferryClickHandler = feature => { @@ -453,9 +444,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 => { @@ -466,9 +454,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 => { @@ -479,9 +464,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) => { @@ -509,11 +491,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 => { @@ -1018,8 +995,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']