From: Benjamin Auder Date: Tue, 4 Dec 2018 13:42:13 +0000 (+0100) Subject: Fix Crazyhouse reserve initial position when selecting X-Git-Url: https://git.auder.net/doc/html/vendor/current/git-logo.png?a=commitdiff_plain;h=5bd679d562f992cad856099fbc98014dc4556801;p=vchess.git Fix Crazyhouse reserve initial position when selecting --- diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 5c1e6024..308d415e 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -755,7 +755,8 @@ Vue.component('my-game', { this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) ? this.vr.getPossibleMovesFrom(startSquare) : []; - e.target.parentNode.appendChild(this.selectedPiece); + // Next line add moving piece just after current image (required for Crazyhouse reserve) + e.target.parentNode.insertBefore(this.selectedPiece, e.target.nextSibling); } }, mousemove: function(e) {