fix duplicate and positioning for render troops

This commit is contained in:
bijx
2026-04-29 19:33:16 -04:00
parent 7c9fa73b9d
commit e5f52c3084
+1 -3
View File
@@ -361,18 +361,16 @@ export class NameLayer implements Layer {
render.troopsDiv.style.fontSize = `${render.fontSize}px`;
render.nameSpan.textContent = render.player.displayName();
render.troopsDiv.textContent = renderTroops(render.player.troops());
render.nameSpan.style.opacity = `${nameOpacity}`;
render.troopsDiv.style.opacity = `${nameOpacity}`;
render.troopsDiv.textContent = renderTroops(render.player.troops());
const fontColor = this.theme.textColor(render.player);
if (render.fontColor !== fontColor) {
render.fontColor = fontColor;
render.nameDiv.style.color = fontColor;
render.troopsDiv.style.color = fontColor;
}
render.troopsDiv.textContent = renderTroops(render.player.troops());
// Handle icons
const iconSize = Math.min(render.fontSize * 1.5, 48);