Fix enter/exit analyze mode in the middle of a multi-move
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 9 Apr 2020 14:47:33 +0000 (16:47 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 9 Apr 2020 14:47:33 +0000 (16:47 +0200)
client/src/components/BaseGame.vue

index 3d8e7eb..7424aa4 100644 (file)
@@ -258,8 +258,11 @@ export default {
       else this.lastMove = null;
     },
     toggleAnalyze: function() {
+      // Autoplay has priority:
+      if (this.autoplay) return;
       if (this.mode != "analyze") {
         // Enter analyze mode:
+        if (this.inMultimove) this.cancelCurrentMultimove();
         this.gameMode = this.mode; //was not 'analyze'
         this.mode = "analyze";
         this.gameCursor = this.cursor;