Fix display of Hiddenqueen diags in corr games
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 26 Apr 2021 18:28:15 +0000 (20:28 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 26 Apr 2021 18:28:15 +0000 (20:28 +0200)
client/src/utils/printDiagram.js
client/src/views/Game.vue

index 4a3a50e..4239688 100644 (file)
@@ -102,7 +102,7 @@ export function getDiagram(args) {
         boardDiv +=
           "<img " +
           "src='/images/pieces/" +
-          vr.getPpath(board[i][j], null, null, orientation) +
+          vr.getPpath(board[i][j], args.color, args.score, orientation) +
           V.IMAGE_EXTENSION + "' " +
           "class='piece'/>";
       }
index 0e430fe..6e9768a 100644 (file)
@@ -1618,7 +1618,9 @@ export default {
         if (["all","byrow"].includes(V.ShowMoves)) {
           this.curDiag = getDiagram({
             position: position,
-            orientation: V.CanFlip ? this.game.mycolor : "w"
+            orientation: V.CanFlip ? this.game.mycolor : "w",
+            color: this.game.mycolor,
+            score: "*"
           });
           document.querySelector("#confirmDiv > .card").style.width =
             boardDiv.offsetWidth + "px";