From 08a5069cbf419f204b69135a0860ba6d53affb7f Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Tue, 24 Mar 2020 04:23:27 +0100 Subject: [PATCH] Fix moves list scrolling. Seemingly a remaining issue in SynchroneChess... (kings captures?) --- client/src/components/MoveList.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); }, -- 2.44.0