Convert tap gesture coordinate to location

This commit is contained in:
Garth Vander Houwen 2023-11-10 08:20:07 -08:00
parent 992a560564
commit 53dc82c0f6

View file

@ -151,6 +151,11 @@ struct MeshMap: View {
}
}
}
.onLongPressGesture(minimumDuration: 0.5, maximumDistance: 100, pressing: {
pressing in
print(pressing)
}, perform: { value in })
.onTapGesture(perform: { screenCoord in
newWaypointLocation = reader.convert(screenCoord, from: .local)
print("Tapped at \(newWaypointLocation)")