fix(NameLayer): apply opacity to flags rendering

- Added context save and restore around flag rendering to apply a global alpha of 0.8, ensuring flags are rendered with the correct opacity as per legacy behavior.
This commit is contained in:
scamiv
2026-02-06 04:34:10 +01:00
parent 3965c3ff27
commit a11495be58
+3
View File
@@ -457,6 +457,8 @@ export class NameLayer implements Layer {
}
if (hasFlag) {
ctx.save();
ctx.globalAlpha *= 0.8;
this.drawImage(
ctx,
`/flags/${flag}.svg`,
@@ -465,6 +467,7 @@ export class NameLayer implements Layer {
flagW,
flagH,
);
ctx.restore();
}
ctx.fillText(cache.lastName, nameLeftX + flagW, nameCenterY);