X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=0856096af897820c86d1f586259be732c4536d69;hb=c7550017d88ff6eb32e2c76a271a7f9edc4a3bf6;hp=921a5998830af4feb80c8295220322591a5e1cde;hpb=78c23cd6e4717d6d07c84177b515c6e03717da7e;p=vchess.git diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 921a5998..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 }) @@ -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 },