seek: false,
fenStart: "",
incheck: [],
+ pgnTxt: "",
expert: document.cookie.length>0 ? document.cookie.substr(-1)=="1" : false,
};
},
attrs: { id: "pgn-game" },
on: { click: this.download },
domProps: {
- innerHTML: this.vr.getPGN(this.mycolor, this.score, this.fenStart, this.mode)
+ innerHTML: this.pgnTxt
}
}
)
this.score = score;
let modalBox = document.getElementById("modal-eog");
modalBox.checked = true;
+ this.pgnTxt = this.vr.getPGN(this.mycolor, this.score, this.fenStart, this.mode);
setTimeout(() => { modalBox.checked = false; }, 2000);
if (this.mode == "human")
this.clearStorage();
return;
}
this.vr = new VariantRules(fen, moves || []);
+ this.pgnTxt = ""; //redundant with this.score = "*", but cleaner
this.mode = mode;
this.incheck = []; //in case of
this.fenStart = continuation