X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;fp=client%2Fsrc%2Fcomponents%2FBoard.vue;h=cc3f6fd7d7a51fd5053f6c7483edf0a07c8b1609;hp=b8d0fadd502ced30eab1381db3a23ea3f91b0bb9;hb=d2af3400944331ffd0c770f83857257c2f48e487;hpb=34b79fe4fa5aecdfa64742e7ff98a1befffa34ed diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index b8d0fadd..cc3f6fd7 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -659,8 +659,9 @@ export default { // Emit the click event which could be used by some variants const targetId = (withPiece ? e.target.parentNode.id : e.target.id); - this.$emit("click-square", getSquareFromId(targetId)); - if (withPiece) { + const sq = getSquareFromId(targetId); + this.$emit("click-square", sq); + if (withPiece && !this.vr.onlyClick(sq)) { this.possibleMoves = this.vr.getPossibleMovesFrom(startSquare); // For potential drag'n drop, remember start coordinates // (to center the piece on mouse cursor)