From 873ce0ba5e4c460afa1cbed0ea82db93cef0be39 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 26 May 2025 14:08:26 +0200 Subject: [PATCH] =?UTF-8?q?feat(poi):=20Mouseover-Tooltip=20f=C3=BCr=20POI?= =?UTF-8?q?s=20mit=20Tailwind-Styling=20ersetzt=20Popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - bindPopup entfernt und durch bindTooltip ersetzt - Tooltip zeigt POI-Details bei Hover - Tailwind-Klassen sorgen für einheitliches Design (rund, schatten, padding) - Version auf 1.1.177 erhöht --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ config/appVersion.js | 2 +- utils/setupPOIs.js | 24 ++++++++++++++++-------- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a472fab2..3c574c97b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,34 @@ Alle bedeutenden Änderungen an diesem Projekt werden in dieser Datei dokumentie --- +[1.1.177] – 2025-05-26 +✨ UI-Verbesserung +POI-Tooltip auf der Karte wird jetzt bei Mouseover angezeigt (nicht mehr per Klick). + +Tooltip ist einheitlich gestaltet mit Tailwind CSS: + +Abgerundete Ecken (rounded-xl) + +Schatten (shadow-lg) + +Innenabstände (px-4 py-2) + +Blaue Überschrift, graue Beschriftung + +Einheitlicher Stil für alle Marker-Tooltips (setupPOIs.js angepasst). + +✅ Clean +Alte bindPopup()-Logik entfernt – kein manuelles Öffnen/Schließen mehr nötig + +closePopup() aus mouseout-Handler entfernt + +Tooltip verwendet sticky: true, folgt der Maus + +🔧 Version +📦 Version erhöht auf 1.1.177 + +--- + [1.1.176] – 2025-05-26 🐞 Fixed Problem behoben, dass das Modal „POI hinzufügen“ nach erfolgreichem Submit nicht geschlossen wurde und die Meldung „Wird hinzugefügt…“ dauerhaft sichtbar blieb. diff --git a/config/appVersion.js b/config/appVersion.js index a248313da..270c3a3e7 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.177"; +export const APP_VERSION = "1.1.178"; diff --git a/utils/setupPOIs.js b/utils/setupPOIs.js index 19993c1fa..87422af4d 100644 --- a/utils/setupPOIs.js +++ b/utils/setupPOIs.js @@ -78,13 +78,21 @@ export const setupPOIs = async ( }); } - marker.bindPopup(` -
- ${poi.description || "Unbekannt"}
- ${deviceName || "unbekannt"}
- ${poiTypName}
-
- `); + marker.bindTooltip( + ` +
+
${poi.description || "Unbekannt"}
+
Gerät: ${deviceName || "unbekannt"}
+
Typ: ${poiTypName}
+
+ `, + { + direction: "top", + offset: [0, -10], + opacity: 0.95, + sticky: true, + } + ); marker.on("mouseover", function () { dispatch(setSelectedPoi(poi)); @@ -94,7 +102,7 @@ export const setupPOIs = async ( marker.on("mouseout", function () { dispatch(clearSelectedPoi()); - this.closePopup(); + //this.closePopup(); }); marker.on("dragend", (e) => {