X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=2bad3014fd237be44bb9316dbf8b73f11304fde8;hb=08a5069cbf419f204b69135a0860ba6d53affb7f;hp=4428f2988be9ce4c07b615bea04cbb9579014576;hpb=b83a675a3066c67cc7843ae27ad8aeffd15b0976;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 4428f298..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]) }} @@ -74,9 +74,8 @@ export default { }; }, mounted: function() { - document.getElementById("adjuster").addEventListener( - "click", - processModalClick); + document.getElementById("adjuster") + .addEventListener("click", processModalClick); if ("ontouchstart" in window) { // Disable tooltips on smartphones: document.querySelectorAll("#aboveMoves .tooltip").forEach(elt => { @@ -136,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); }, @@ -194,7 +199,7 @@ export default { padding: 5px img.inline - height: 24px + height: 22px @media screen and (max-width: 767px) height: 18px @@ -226,6 +231,6 @@ span#rulesBtn button margin: 0 -button.tooltip +#aboveMoves button padding-bottom: 5px