From: Benjamin Auder Date: Tue, 24 Mar 2020 03:23:27 +0000 (+0100) Subject: Fix moves list scrolling. Seemingly a remaining issue in SynchroneChess... (kings... X-Git-Url: https://git.auder.net/variants/Apocalypse/scripts/current/doc/html/left.jpg?a=commitdiff_plain;h=08a5069cbf419f204b69135a0860ba6d53affb7f;p=vchess.git Fix moves list scrolling. Seemingly a remaining issue in SynchroneChess... (kings captures?) --- diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 140b71cf..2bad3014 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -53,7 +53,7 @@ div | {{ notation(moves[moveIdx]) }} .td( v-if="moveIdx < moves.length-1" - :class="{'highlight-lm': cursor == moveIdx+1}" + :class="{'highlight-lm': highlightBlackmove(moveIdx)}" @click="() => gotoMove(moveIdx+1)" ) | {{ notation(moves[moveIdx+1]) }} @@ -135,6 +135,12 @@ export default { notation: function(move) { return getFullNotation(move); }, + highlightBlackmove: function(moveIdx) { + return ( + this.cursor == moveIdx + 1 || + (this.show == "byrow" && this.cursor == moveIdx + 2) + ); + }, gotoMove: function(index) { this.$emit("goto-move", index); },