Better move canceling when exiting board
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 20 Apr 2020 23:32:52 +0000 (01:32 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 20 Apr 2020 23:32:52 +0000 (01:32 +0200)
client/src/components/Board.vue

index 4af6469..4139862 100644 (file)
@@ -669,6 +669,8 @@ export default {
           delete this.selectedPiece;
           this.selectedPiece = null;
           this.start = null;
+          this.possibleMoves = []; //in case of
+          this.click = "";
           let selected = document.querySelector(".ghost");
           if (!!selected) selected.classList.remove("ghost");
         }