Rockets to scale: no overlapping bases !46

merged merged by cmc on 2026-10-19 05:40 UTC · krz/moonrise:rocket-widths into main

1 file changed, +5 −3

Layout: unified · split

App/Sources/RocketLineup.swift +5 −3
@@ -70,20 +70,22 @@ struct RocketLineup: View {
70 let mine = r.id == highlight 70 let mine = r.id == highlight
71 let h = d.heightM! * scale 71 let h = d.heightM! * scale
72 let w = max((d.diameterM ?? 3) * scale, 4) 72 let w = max((d.diameterM ?? 3) * scale, 4)
73 // Fins reach 0.35 × width past each side, so wide rockets get a wider column.
74 let width = max(column, w * 1.7 + 14)
73 return VStack(spacing: 4) { 75 return VStack(spacing: 4) {
74 Text(String(format: "%.0f m", d.heightM!)).font(.caption2.monospacedDigit()).foregroundStyle(ink.opacity(0.7)) 76 Text(String(format: "%.0f m", d.heightM!)).font(.caption2.monospacedDigit()).foregroundStyle(ink.opacity(0.7))
75 .frame(height: top - 4) 77 .frame(height: top - 4)
76 RocketShape() 78 RocketShape()
77 .fill(mine ? accent : ink.opacity(0.75)) 79 .fill(mine ? accent : ink.opacity(0.75))
78 .frame(width: w, height: h) 80 .frame(width: w, height: h)
79 Rectangle().fill(ink.opacity(0.35)).frame(width: column, height: 0.5) 81 Rectangle().fill(ink.opacity(0.35)).frame(width: width, height: 0.5)
80 Text(r.title).font(.caption2.weight(mine ? .semibold : .regular)) 82 Text(r.title).font(.caption2.weight(mine ? .semibold : .regular))
81 .foregroundStyle(mine ? accent : ink.opacity(0.85)) 83 .foregroundStyle(mine ? accent : ink.opacity(0.85))
82 .multilineTextAlignment(.center) 84 .multilineTextAlignment(.center)
83 .lineLimit(2) 85 .lineLimit(2)
84 .frame(width: column - 6, height: bottom - 6, alignment: .top) 86 .frame(width: width - 6, height: bottom - 6, alignment: .top)
85 } 87 }
86 .frame(width: column) 88 .frame(width: width)
87 .contentShape(Rectangle()) 89 .contentShape(Rectangle())
88 .accessibilityElement(children: .ignore) 90 .accessibilityElement(children: .ignore)
89 .accessibilityLabel("\(r.title), \(Int(d.heightM!)) metres") 91 .accessibilityLabel("\(r.title), \(Int(d.heightM!)) metres")