X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=5ed351a7f4c913952cebabc430884b1b63a7e7fb;hb=204b0bb5dc8b5f2760fcbf60cc23deb4552f4305;hp=0fd4e1f07375a1064eb0a1cff0e68b3a54adb3ae;hpb=00eef1ca12534a43cb8e2e12155a46c00353eac2;p=vchess.git diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index 0fd4e1f0..5ed351a7 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -64,6 +64,9 @@ export default { lmHighlights[m.start.x + sizeX * m.start.y] = true; if (!m.end.noHighlight && V.OnBoard(m.end.x, m.end.y)) lmHighlights[m.end.x + sizeX * m.end.y] = true; + if (!!m.start.toplay) + // For Dice variant (at least?) + lmHighlights[m.start.toplay[0] + sizeX * m.start.toplay[1]] = true; }); } const showLight = ( @@ -638,6 +641,7 @@ export default { const color = this.analyze ? this.vr.turn : this.userColor; if (this.vr.canIplay(color, startSquare)) this.possibleMoves = this.vr.getPossibleMovesFrom(startSquare); + else return; // For potential drag'n drop, remember start coordinates // (to center the piece on mouse cursor) const rect = parent.getBoundingClientRect();