From 70e0a238e9478187f3670123b9245905e9512e61 Mon Sep 17 00:00:00 2001 From: rene Date: Sat, 30 May 2026 13:42:17 +0200 Subject: [PATCH] Karten: Auto-Zentrieren beim Erscheinen via .onAppear (.onChange bleibt) --- BanYaroGo/Views/GiftkoederView.swift | 1 + BanYaroGo/Views/VerloreneHundeView.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/BanYaroGo/Views/GiftkoederView.swift b/BanYaroGo/Views/GiftkoederView.swift index dacb8d8..dda5ffb 100644 --- a/BanYaroGo/Views/GiftkoederView.swift +++ b/BanYaroGo/Views/GiftkoederView.swift @@ -66,6 +66,7 @@ struct GiftkoederView: View { } .frame(height: 260) .ignoresSafeArea(edges: .top) + .onAppear { centerOn(coord) } .overlay(alignment: .topTrailing) { Button { centerOn(coord) diff --git a/BanYaroGo/Views/VerloreneHundeView.swift b/BanYaroGo/Views/VerloreneHundeView.swift index 378cfb0..ccb0be3 100644 --- a/BanYaroGo/Views/VerloreneHundeView.swift +++ b/BanYaroGo/Views/VerloreneHundeView.swift @@ -87,6 +87,7 @@ struct VerloreneHundeView: View { } .frame(height: 260) .ignoresSafeArea(edges: .top) + .onAppear { centerOn(coord) } .overlay(alignment: .topTrailing) { Button { centerOn(coord)