X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=2a54cbbe1a18f9f162e889e71b325371f7d53847;hp=100f7efb49b6cb997c528ed0c2cf1e9265599275;hb=e891730f77312340d68bb7ef72a4207541fa3914;hpb=cc00b83cd8e91a3defa99acc95ee8bc7e6c8a819 diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 100f7efb..2a54cbbe 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -359,9 +359,11 @@ export default { new Audio("/sounds/move.mp3").play().catch(() => {}); if (this.vr.turn != initurn) { // Turn has changed: move is complete - if (!smove.fen) + if (!smove.fen) { // NOTE: only FEN of last sub-move is required (thus setting it here) smove.fen = this.vr.getFen(); + this.emitFenIfAnalyze(); + } this.inMultimove = false; const score = this.vr.getCurrentScore(); if (score != "*") { @@ -408,10 +410,8 @@ export default { if (received && this.cursor < this.moves.length - 1) this.gotoEnd(); playMove(); - this.emitFenIfAnalyze(); }, cancelCurrentMultimove: function() { - // Cancel current multi-move const L = this.moves.length; let move = this.moves[L-1]; if (!Array.isArray(move)) move = [move];