Files
nodeMap/docs/components/gisPolylines/PolylineContextMenu.md
2025-06-24 15:07:00 +02:00

42 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- /docs/components/gisPolylines/PolylineContextMenu.md -->
# 📐 PolylineContextMenu.js
Ein einfaches benutzerdefiniertes Kontextmenü zur Interaktion mit Linien (Polylinien) auf der Karte.
![GIS Ployline contextmenu](../../screenshots/PolylineContextMenu.png)
## Zweck
Das Menü erlaubt folgende Interaktionen:
- „Stützpunkt hinzufügen“
- „Stützpunkt entfernen“
- ❌ „Schließen“
Wird dynamisch positioniert anhand der Klickkoordinaten (`position.x`, `position.y`).
## Props
| Prop | Typ | Beschreibung |
| --------------- | ---------- | ----------------------------------------------------- |
| `position` | `{x, y}` | Position in Pixelkoordinaten (z.B. von Mausereignis) |
| `onAddPoint` | `function` | Handler für „Stützpunkt hinzufügen“ |
| `onRemovePoint` | `function` | Handler für „Stützpunkt entfernen“ |
| `onClose` | `function` | Handler zum Schließen des Menüs |
## Styling
- Absolut positioniertes `div`
- Weißer Hintergrund, schwarzer Rahmen
- Kein Tailwind purer Inline-Style
## Verwendung
Eingebettet z.B. in `setupPolylines.js` oder `PolylineLayerManager`, um rechte Mausklicks auf
Linien zu behandeln.
---
[Zurück zur Übersicht](../../README.md)