Skip to content

Commit 06c49f5

Browse files
authored
Merge pull request #146 from TaskarCenterAtUW/feature-initial-detent
Show largest detent as initial detent
2 parents 8340db4 + 246213c commit 06c49f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GoInfoGame/GoInfoGame/UI/Map/MapView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ struct MapView: View {
2222
@State private var showAlert = false
2323
@StateObject var contextualInfo = ContextualInfo.shared
2424

25+
@State private var selectedDetent: PresentationDetent = .fraction(0.8)
26+
2527
@AppStorage("baseUrl") var baseUrl = ""
2628

2729
var body: some View {
@@ -116,10 +118,9 @@ struct MapView: View {
116118
CustomSheetView {
117119
selectedQuest?.parent?.form
118120
}
119-
.presentationDetents([.fraction(0.8), .fraction(0.5)])
121+
.presentationDetents([.fraction(0.8), .fraction(0.5), .fraction(0.1)], selection: $selectedDetent)
120122
.scrollDisabled(false)
121123
.environmentObject(contextualInfo)
122-
// .interactiveDismissDisabled()
123124
.onAppear {
124125
shouldShowPolyline = true
125126
}

0 commit comments

Comments
 (0)