This commit is contained in:
ISA
2025-05-28 08:04:34 +02:00
parent 97fbb6fdc1
commit 5f0133d638
107 changed files with 1446 additions and 454 deletions

View File

@@ -0,0 +1,10 @@
<!-- /docs/utils/polylines/contextMenu.md -->
# 📋 contextMenu.js
Funktionen zum Steuern des Polyline-Kontextmenüs (Schließen, Zurücksetzen, etc.).
## exportierte Funktionen
- `closePolylineSelectionAndContextMenu(map)`: Setzt Polyline-Auswahl zurück und schließt das Kontextmenü
- `monitorContextMenu(map)`: Überwacht via `localStorage`, ob das Menü automatisch geschlossen werden soll

View File

@@ -0,0 +1,10 @@
<!-- /docs/utils/polylines/eventHandlers.md -->
# 🖱️ eventHandlers.js
Bindet Maus-Events an Polylinien (z.B. Hover-Effekte).
## exportierte Funktionen
- `enablePolylineEvents(polylines, lineColors)`
- `disablePolylineEvents(polylines)`

View File

@@ -0,0 +1,10 @@
<!-- /docs/utils/polylines/monitorContextMenu.md -->
# 🔄 monitorContextMenu.js
Erweiterte Überwachung des Kontextmenüs über `localStorage`.
## Funktion
- Importiert `closePolylineSelectionAndContextMenu`
- Ruft regelmäßig `setTimeout` auf, um `contextMenuExpired` zu prüfen

View File

@@ -0,0 +1,10 @@
<!-- /docs/utils/polylines/polylineSubscription.md -->
# 🧭 polylineSubscription.js
Abonnement auf den Redux-Store, um auf `forceClose` im Kontextmenü zu reagieren.
## Verhalten
- Erkennt `polylineContextMenu.forceClose`
- Ruft `contextmenu.hide()` auf und resetet Redux-Status

View File

@@ -0,0 +1,14 @@
<!-- /docs/utils/polylines/redrawPolyline.md -->
# 🔁 redrawPolyline.js
Zeichnet eine Polyline mit neuen Koordinaten und Tooltip neu.
## Funktion
```js
redrawPolyline(lineData, lineColors, tooltipContents, map)
```
- Entfernt vorherige Polyline
- Erstellt neue mit Tooltip und Hover-Effekten

View File

@@ -1,3 +1,5 @@
<!-- /docs/utils/polylines/setupPolylines.md -->
# 🧭 setupPolylines.js Polylinien zeichnen und verwalten
## Zweck
@@ -38,10 +40,7 @@ NEXT_PUBLIC_API_PORT_MODE=dev
```js
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
const baseUrl =
mode === "dev"
? `${window.location.protocol}//${window.location.hostname}:80/talas5/`
: `${window.location.origin}/talas5/`;
const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/` : `${window.location.origin}/talas5/`;
```
---
@@ -74,4 +73,4 @@ const baseUrl =
---
📄 Pfad: `/docs/frontend/utils/polylines/setupPolylines.md`
📄 Pfad: `/docs/frontend/utils/polylines/setupPolylines.md`