docs
This commit is contained in:
31
docs/components/contextmenu/CoordinatePopup.md
Normal file
31
docs/components/contextmenu/CoordinatePopup.md
Normal file
@@ -0,0 +1,31 @@
|
||||
<!-- /docs/components/contextmenu/CoordinatePopup.md -->
|
||||
|
||||
# 📌 CoordinatePopup.js
|
||||
|
||||
Zeigt ein modales Fenster mit Koordinateninformationen an, z. B. aus einem Kontextmenü heraus.
|
||||
|
||||
## Features
|
||||
|
||||
- Darstellung eines Koordinatenwerts (`lat,lng`)
|
||||
- Kopieren in die Zwischenablage (Clipboard API + Fallback)
|
||||
- Modal zentriert mit Tailwind CSS
|
||||
- Zwei Buttons: „Kopieren“ und „Schließen“
|
||||
|
||||
## Props
|
||||
|
||||
| Name | Typ | Beschreibung |
|
||||
|-------------|-----------|------------------------------------|
|
||||
| `isOpen` | `boolean` | Steuert Sichtbarkeit des Modals |
|
||||
| `coordinates` | `string` | Zu zeigende Koordinaten (z. B. `"53.2,8.1"`) |
|
||||
| `onClose` | `function` | Wird bei Klick auf „Schließen“ ausgelöst |
|
||||
|
||||
## Design
|
||||
|
||||
- Tailwind-Klassen für zentriertes Layout (`fixed`, `inset-0`, `z-50`)
|
||||
- Leicht animierter Button-Hover
|
||||
|
||||
## Interne Logik
|
||||
|
||||
- Nutzt `navigator.clipboard.writeText` oder Fallback mit `document.execCommand("copy")`
|
||||
- Stoppt Event-Bubbling, um Klick außerhalb zu erkennen
|
||||
|
||||
Reference in New Issue
Block a user