From a954f2a66f8b8d7e54cd578e4a7f97877d50a675 Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 19 Apr 2024 14:29:27 +0200 Subject: [PATCH] =?UTF-8?q?Card=20=C3=BCber=20den=20Map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DataSheet.js | 85 ++++++++++++++++++-------------------- components/ExpandIcon.js | 22 ++++++++++ components/MapComponent.js | 14 ++++++- public/img/expand-icon.svg | 3 ++ 4 files changed, 77 insertions(+), 47 deletions(-) create mode 100644 components/ExpandIcon.js create mode 100644 public/img/expand-icon.svg diff --git a/components/DataSheet.js b/components/DataSheet.js index f93f9d552..a2d941456 100644 --- a/components/DataSheet.js +++ b/components/DataSheet.js @@ -14,7 +14,6 @@ function DataSheet() { // Füge hier weitere Stationen hinzu, falls nötig ]; - // Initialisiere den Zustand mit allen Stationen als nicht gecheckt (false) const [checkedStations, setCheckedStations] = useState( stationListing.reduce((acc, station) => { acc[station.id] = false; @@ -40,53 +39,49 @@ function DataSheet() { return (
-
-
-
- -
-
- -
-
-
- {stationListing.map((station) => ( -
- handleCheckboxChange(station.id)} - // Wenn du möchtest, dass die Checkboxen nicht veränderbar sind, entferne den onChange-Handler und setze `readOnly` - /> -
); diff --git a/components/ExpandIcon.js b/components/ExpandIcon.js new file mode 100644 index 000000000..215fdf076 --- /dev/null +++ b/components/ExpandIcon.js @@ -0,0 +1,22 @@ +const ExpandIcon = () => { + return ( + + + + + + + ); +}; + +export default ExpandIcon; diff --git a/components/MapComponent.js b/components/MapComponent.js index 8509daff4..c8cf70f2e 100644 --- a/components/MapComponent.js +++ b/components/MapComponent.js @@ -522,7 +522,12 @@ const MapComponent = ({ locations, onLocationUpdate }) => { : `TileMap/img/icons/marker-icon-${iconNumber}.png`; // Wenn der Pfad das Wort "critical" oder "major" enthält, dann den Marker bouncing options setzen - if (path.includes("critical") || path.includes("major")) { + if ( + path.includes("critical") || + path.includes("major") || + path.includes("minor") || + path.includes("system") + ) { // Setze Bouncing-Optionen marker.setBouncingOptions({ bounceHeight: 15, // Höhe des Bounces @@ -617,7 +622,12 @@ const MapComponent = ({ locations, onLocationUpdate }) => { }) ); // Check if the icon path includes 'critical' and initiate bouncing - if (iconPath.includes("critical") || iconPath.includes("major")) { + if ( + iconPath.includes("critical") || + iconPath.includes("major") || + iconPath.includes("minor") || + iconPath.includes("system") + ) { marker.setBouncingOptions({ bounceHeight: 15, contractHeight: 12, diff --git a/public/img/expand-icon.svg b/public/img/expand-icon.svg new file mode 100644 index 000000000..42f6e3731 --- /dev/null +++ b/public/img/expand-icon.svg @@ -0,0 +1,3 @@ + + +