static get CanAnalyze() {
return true;
}
+ // Patch: issues with javascript OOP, objects can't access static fields.
+ get canAnalyze() {
+ return V.CanAnalyze;
+ }
// Some variants show incomplete information,
// and thus show only a partial moves list or no list at all.
static get ShowMoves() {
return "all";
}
+ get showMoves() {
+ return V.ShowMoves;
+ }
// Turn "wb" into "B" (for FEN)
static board2fen(b) {
| {{ st.tr["Rules"] }}
#movesList
MoveList(
- v-if="showMoves"
+ v-if="showMoves != 'none'"
+ :show="showMoves"
:score="game.score"
:message="game.scoreMsg"
:firstNum="firstMoveNumber"
},
computed: {
showMoves: function() {
- return this.game.score != "*" || (this.vr && this.vr.ShowMoves == "all");
+ return this.game.score != "*"
+ ? "all"
+ : (this.vr ? this.vr.showMoves : "none");
},
showTurn: function() {
- return this.game.score == '*' && this.vr && this.vr.ShowMoves != "all";
+ return this.game.score == '*' && this.vr && this.vr.showMoves != "all";
},
turn: function() {
return this.vr
: "";
},
canAnalyze: function() {
- return this.game.mode != "analyze" && this.vr && this.vr.CanAnalyze;
+ return this.game.mode != "analyze" && this.vr && this.vr.canAnalyze;
},
allowDownloadPGN: function() {
- return this.game.score != "*" || (this.vr && this.vr.ShowMoves == "all");
+ return this.game.score != "*" || (this.vr && this.vr.showMoves == "all");
}
},
created: function() {
import { store } from "@/store";
export default {
name: "my-move-list",
- props: ["moves", "cursor", "score", "message", "firstNum"],
+ props: ["moves", "show", "cursor", "score", "message", "firstNum"],
+ // TODO: if show == "byrows", show only full rows.
render(h) {
let rootElements = [];
if (!!this.score && this.score != "*") {