X-Git-Url: https://git.auder.net/variants/Cwda/complete_rules.html?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=84976b0c6629cef1bf2ebf37d21446da375c6dde;hb=9106c77bf4f1d56ad855d4ffbb93f945065d7fac;hp=6d05a2a6393d557d10d3c38f313843d245d610e0;hpb=6752407b88b6d7678b9b19df4ffe1224d17625d7;p=vchess.git diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 6d05a2a6..84976b0c 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -437,9 +437,9 @@ Vue.component('my-game', { mousedown: this.mousedown, mousemove: this.mousemove, mouseup: this.mouseup, - touchdown: this.mousedown, + touchstart: this.mousedown, touchmove: this.mousemove, - touchup: this.mouseup, + touchend: this.mouseup, }, }, elementArray @@ -755,9 +755,8 @@ Vue.component('my-game', { this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) ? this.vr.getPossibleMovesFrom(startSquare) : []; - console.log(this.possibleMoves); - console.log(this.vr.promoted); - 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) {