diff --git a/ts/RailroadMap.ts b/ts/RailroadMap.ts index 8efe044..d7b268e 100644 --- a/ts/RailroadMap.ts +++ b/ts/RailroadMap.ts @@ -993,7 +993,8 @@ export class RailroadMap { if (frameText) { const yaw = normalizeAngle(frame.rotation.yaw); const flip = (yaw > -90) && (yaw < 90); - const transform = flip ? 'rotate(180) translate(0 25)' : 'translate(0 25)'; + const needsRotate = (this.inverted && flip) || (!this.inverted && !flip); + const transform = needsRotate ? 'rotate(180) translate(0 25)' : 'translate(0 25)'; const text = g .text(gvasToString(frameText)) .attr('transform', transform)