From 7e4fb0a15482f863bedc2377e46217bdf346ce87 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 5 Apr 2026 14:57:16 -0700 Subject: [PATCH] fix compass labels --- Meshtastic/Views/Helpers/CompassView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Meshtastic/Views/Helpers/CompassView.swift b/Meshtastic/Views/Helpers/CompassView.swift index 46caa40d..c6844fc3 100644 --- a/Meshtastic/Views/Helpers/CompassView.swift +++ b/Meshtastic/Views/Helpers/CompassView.swift @@ -100,8 +100,7 @@ struct CompassView: View { // Cardinal and intercardinal labels ForEach(CompassLabel.allLabels, id: \.degrees) { label in - CompassLabelView(label: label, radius: dialRadius - 28) - .rotationEffect(.degrees(-locationsHandler.heading)) + CompassLabelView(label: label, radius: dialRadius - 28, heading: locationsHandler.heading) } // North triangle indicator at 0° @@ -257,13 +256,14 @@ struct CompassLabel { struct CompassLabelView: View { let label: CompassLabel let radius: CGFloat + let heading: Double var body: some View { Text(label.text) .font(.system(size: label.isCardinal ? 18 : 13, weight: label.isCardinal ? .bold : .medium)) .foregroundColor(label.degrees == 0 ? .orange : .primary) - .rotationEffect(.degrees(-label.degrees)) + .rotationEffect(.degrees(-label.degrees + heading)) .offset(y: -radius) .rotationEffect(.degrees(label.degrees)) }