From 85391ef32d8624c48713d66f4783ce1473cc38d1 Mon Sep 17 00:00:00 2001 From: Michel Bretschneider Date: Sun, 22 Dec 2024 16:06:28 +0100 Subject: [PATCH] fix player name rotation --- ts/RailroadMap.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/RailroadMap.ts b/ts/RailroadMap.ts index d7b268e..ec97df7 100644 --- a/ts/RailroadMap.ts +++ b/ts/RailroadMap.ts @@ -1116,9 +1116,10 @@ export class RailroadMap { private renderPlayer(player: Player) { if (!player.name) return; if (!player.location) return; + const rotation = this.inverted ? 180 : 0; return this.layers.players .text(player.name) - .attr('transform', makeTransform(player.location.x, player.location.y, 180)) + .attr('transform', makeTransform(player.location.x, player.location.y, rotation)) .addClass('player'); }