Karten: Auto-Zentrieren beim Erscheinen via .onAppear (.onChange bleibt)

This commit is contained in:
rene 2026-05-30 13:42:17 +02:00
parent a6ea7b5b8f
commit 70e0a238e9
2 changed files with 2 additions and 0 deletions

View file

@ -66,6 +66,7 @@ struct GiftkoederView: View {
}
.frame(height: 260)
.ignoresSafeArea(edges: .top)
.onAppear { centerOn(coord) }
.overlay(alignment: .topTrailing) {
Button {
centerOn(coord)

View file

@ -87,6 +87,7 @@ struct VerloreneHundeView: View {
}
.frame(height: 260)
.ignoresSafeArea(edges: .top)
.onAppear { centerOn(coord) }
.overlay(alignment: .topTrailing) {
Button {
centerOn(coord)