X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBaseGame.vue;h=ee3bea181fb52a12e57298cc9b3fd3e79b2245ac;hb=bc1e1f2adf7de1efdf29933a666bcce4214e132f;hp=7627f2dc0bb43462969d4c0423e769b4665b4175;hpb=cbe9537881e68f50c43f48d3699c4b248690fb4d;p=vchess.git diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 7627f2dc..ee3bea18 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -22,6 +22,7 @@ div#baseGame :incheck="incheck" @play-move="play" @click-square="clickSquare" + @rendered="adjustSize" ) #turnIndicator(v-if="showTurn") {{ turn }} #controls.button-group @@ -43,6 +44,7 @@ div#baseGame p#fenAnalyze(v-show="showFen") {{ (!!vr ? vr.getFen() : "") }} #movesList MoveList( + ref="moveslist" :show="showMoves" :canAnalyze="canAnalyze" :canDownload="allowDownloadPGN" @@ -167,7 +169,8 @@ export default { baseGameDiv.tabIndex = 0; baseGameDiv.addEventListener("click", this.focusBg); baseGameDiv.addEventListener("keydown", this.handleKeys); - baseGameDiv.addEventListener("wheel", this.handleScroll); + if (this.st.settings.scrollmove) + baseGameDiv.addEventListener("wheel", this.handleScroll); } document.getElementById("eogDiv") .addEventListener("click", processModalClick); @@ -205,6 +208,9 @@ export default { if (e.deltaY < 0) this.undo(); else if (e.deltaY > 0) this.play(); }, + adjustSize: function() { + this.$refs["moveslist"].adjustBoard("vertical"); + }, redrawBoard: function() { this.$refs["board"].re_setDrawings(); }, @@ -340,6 +346,7 @@ export default { pgn += '[Url "' + params.serverUrl + '/game/' + this.game.id + '"]\n'; if (!!this.game.cadence) pgn += '[Cadence "' + this.game.cadence + '"]\n'; + pgn += '[Options "' + JSON.stringify(this.game.options) + '"]\n'; pgn += '\n'; for (let i = 0; i < this.moves.length; i += 2) { if (i > 0) pgn += " ";