@@ -22,23 +22,6 @@ struct ShowGeodesicSectorAndEllipseView: View {
2222 /// Manages the presentation state of the menu.
2323 @State private var isPresented = false
2424
25- /// The menu which holds the options that change the ellipse and sector.
26- private var settingsSheet : some View {
27- NavigationStack {
28- SectorSettingsView ( model: $model)
29- . presentationDetents ( [ . medium] )
30- . navigationTitle ( " Settings " )
31- . navigationBarTitleDisplayMode ( . inline)
32- . toolbar {
33- ToolbarItem ( placement: . confirmationAction) {
34- Button ( " Dismiss " ) {
35- isPresented = false
36- }
37- }
38- }
39- }
40- }
41-
4225 var body : some View {
4326 MapViewReader { mapView in
4427 MapView (
@@ -67,6 +50,23 @@ struct ShowGeodesicSectorAndEllipseView: View {
6750 }
6851 }
6952 }
53+
54+ /// The menu which holds the options that change the ellipse and sector.
55+ private var settingsSheet : some View {
56+ NavigationStack {
57+ SectorSettingsView ( model: $model)
58+ . presentationDetents ( [ . medium] )
59+ . navigationTitle ( " Settings " )
60+ . navigationBarTitleDisplayMode ( . inline)
61+ . toolbar {
62+ ToolbarItem ( placement: . confirmationAction) {
63+ Button ( " Done " ) {
64+ isPresented = false
65+ }
66+ }
67+ }
68+ }
69+ }
7070}
7171
7272private extension ShowGeodesicSectorAndEllipseView {
@@ -254,7 +254,9 @@ private extension ShowGeodesicSectorAndEllipseView {
254254 value: model. axisDirection,
255255 format: angleFormat
256256 )
257+
257258 let axisDirectionRange = 0.0 ... 360.0
259+
258260 Slider (
259261 value: $model. axisDirection. value,
260262 in: axisDirectionRange
@@ -286,6 +288,7 @@ private extension ShowGeodesicSectorAndEllipseView {
286288 )
287289
288290 let maxPointCountRange = 1.0 ... 1_000.0
291+
289292 Slider (
290293 value: $model. maxPointCount,
291294 in: maxPointCountRange,
@@ -306,6 +309,7 @@ private extension ShowGeodesicSectorAndEllipseView {
306309 )
307310
308311 let maxSegmentLengthRange = 1.0 ... 1_000.0
312+
309313 Slider (
310314 value: $model. maxSegmentLength,
311315 in: maxSegmentLengthRange
@@ -323,12 +327,15 @@ private extension ShowGeodesicSectorAndEllipseView {
323327 Text ( geometryType. label)
324328 }
325329 }
330+
326331 LabeledContent (
327332 " Sector Angle " ,
328333 value: model. sectorAngle,
329334 format: angleFormat
330335 )
336+
331337 let sectorAngleRange = 0.0 ... 360.0
338+
332339 Slider (
333340 value: $model. sectorAngle. value,
334341 in: sectorAngleRange
@@ -360,6 +367,7 @@ private extension ShowGeodesicSectorAndEllipseView {
360367 )
361368
362369 let semiAxis1LengthRange = 0.0 ... 1_0000.0
370+
363371 Slider (
364372 value: $model. semiAxis1Length,
365373 in: semiAxis1LengthRange
@@ -379,6 +387,7 @@ private extension ShowGeodesicSectorAndEllipseView {
379387 )
380388
381389 let semiAxis2LengthRange = 0.0 ... 1_000.0
390+
382391 Slider (
383392 value: $model. semiAxis2Length,
384393 in: semiAxis2LengthRange
0 commit comments