X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=0856096af897820c86d1f586259be732c4536d69;hb=c7550017d88ff6eb32e2c76a271a7f9edc4a3bf6;hp=447040f98ca836e35d09b350fde98d0be8f39cb0;hpb=14edde727da93d5b51dfd4dcd34472dca55a35c2;p=vchess.git diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 447040f9..0856096a 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -55,6 +55,10 @@ export default { this.settings.highlight && ["all","highlight"].includes(V.ShowMoves) ); + const showCheck = ( + this.settings.highlight && + ["all","highlight","byrow"].includes(V.ShowMoves) + ); const orientation = !V.CanFlip ? "w" : this.orientation; // Ensure that squares colors do not change when board is flipped const lightSquareMod = (sizeX + sizeY) % 2; @@ -149,8 +153,8 @@ export default { "in-shadow": inShadow(ci, cj), "highlight-light": inHighlight(ci, cj) && lightSquare, "highlight-dark": inHighlight(ci, cj) && !lightSquare, - "incheck-light": showLight && lightSquare && incheckSq[ci][cj], - "incheck-dark": showLight && !lightSquare && incheckSq[ci][cj] + "incheck-light": showCheck && lightSquare && incheckSq[ci][cj], + "incheck-dark": showCheck && !lightSquare && incheckSq[ci][cj] }, attrs: { id: getSquareId({ x: ci, y: cj }) @@ -317,8 +321,8 @@ export default { // Force a delay between move is shown and clicked // (otherwise a "double-click" bug might occur) if (Date.now() - this.clickTime < 200) return; - this.play(m); this.choices = []; + this.play(m); }; const onClick = this.mobileBrowser @@ -341,10 +345,8 @@ export default { attrs: { src: "/images/pieces/" + - this.vr.getPPpath( - m.appear[0].c + m.appear[0].p, - // Extra arg useful for some variants: - this.orientation) + + // orientation: extra arg useful for some variants: + this.vr.getPPpath(m, this.orientation) + V.IMAGE_EXTENSION }, class: { "choice-piece": true },