X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=d89ee40498c0a2fd205934b1987ceb4ae99b05ee;hp=447040f98ca836e35d09b350fde98d0be8f39cb0;hb=d54f6261c9e30f4eabb402ad301dd5c5e40fb656;hpb=14edde727da93d5b51dfd4dcd34472dca55a35c2 diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 447040f9..d89ee404 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