X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=a9fa9834b042e6e6d37244c6fff6aac6c6a29b18;hb=e6bcc1d87c65264608d1134a24d758e0f2a687c1;hp=d2ae3f3514e4081e0fe2a74ac5ac1057ec618161;hpb=49dad26138d3dee0cacbb94ad8d3d3eff12c477a;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index d2ae3f35..a9fa9834 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -101,10 +101,8 @@ export default { window.addEventListener("resize", () => { if (!timeoutLaunched) { timeoutLaunched = true; - setTimeout(() => { - this.adjustBoard(); - timeoutLaunched = false; - }, 500); + this.adjustBoard(); + setTimeout(() => { timeoutLaunched = false; }, 500); } }); }, @@ -140,7 +138,14 @@ export default { highlightBlackmove: function(moveIdx) { return ( this.cursor == moveIdx || - (this.show == "byrow" && this.cursor == moveIdx + 1) + ( + // If display by rows, hightlight last black move while the white + // move is being played: + this.show == "byrow" && + this.cursor == moveIdx + 1 && + // ...except if cursor is behind in the game: + this.cursor == this.moves.length - 1 + ) ); }, gotoMove: function(index) {