| {{ notation(moves[moveIdx]) }}
.td(
v-if="moveIdx < moves.length-1"
- :class="{'highlight-lm': highlightBlackmove(moveIdx)}"
+ :class="{'highlight-lm': highlightBlackmove(moveIdx+1)}"
@click="() => gotoMove(moveIdx+1)"
)
| {{ notation(moves[moveIdx+1]) }}
},
highlightBlackmove: function(moveIdx) {
return (
- this.cursor == moveIdx + 1 ||
- (this.show == "byrow" && this.cursor == moveIdx + 2)
+ this.cursor == moveIdx ||
+ (this.show == "byrow" && this.cursor == moveIdx + 1)
);
},
gotoMove: function(index) {
adjustBoard: function() {
const boardContainer = document.getElementById("boardContainer");
if (!boardContainer) return; //no board on page
+ let arrows = document.getElementById("arrowCanvas");
+ // TODO: arrows on board don't scale
+ if (!!arrows) this.$emit("reset-arrows");
const k = document.getElementById("boardSize").value;
const movesWidth = window.innerWidth >= 768 ? 280 : 0;
const minBoardWidth = 240; //TODO: these 240 and 280 are arbitrary...