button(@click="flip()") ⇅
button(@click="play()") >
button(@click="gotoEnd()") >>
button(@click="flip()") ⇅
button(@click="play()") >
button(@click="gotoEnd()") >>
#downloadDiv(v-if="game.vname!='Dark' || game.score!='*'")
a#download(href="#")
button(@click="download()") {{ st.tr["Download"] }} PGN
#downloadDiv(v-if="game.vname!='Dark' || game.score!='*'")
a#download(href="#")
button(@click="download()") {{ st.tr["Download"] }} PGN
if (!!newMove) //if stop + launch new game, get undefined move
this.play(newMove, "receive");
},
if (!!newMove) //if stop + launch new game, get undefined move
this.play(newMove, "receive");
},
: window.innerWidth);
}
const movesWidth = (window.innerWidth >= 768 ? 280 : 0);
document.getElementById("boardContainer").style.width = boardSize + "px";
let gameContainer = document.getElementById("gameContainer");
gameContainer.style.width = (boardSize + movesWidth) + "px";
: window.innerWidth);
}
const movesWidth = (window.innerWidth >= 768 ? 280 : 0);
document.getElementById("boardContainer").style.width = boardSize + "px";
let gameContainer = document.getElementById("gameContainer");
gameContainer.style.width = (boardSize + movesWidth) + "px";
// timeout to avoid calling too many time the adjust method
let timeoutLaunched = false;
window.addEventListener("resize", (e) => {
// timeout to avoid calling too many time the adjust method
let timeoutLaunched = false;
window.addEventListener("resize", (e) => {
- if (this.game.fenStart.indexOf(" b ") >= 0 ||
- (this.moves.length > 0 && this.moves[0].color == "b"))
+ if ((this.moves.length > 0 && this.moves[0].color == "b") ||
+ (this.moves.length == 0 && this.vr_tmp.turn == "b"))
{
// 'end' is required for Board component to check lastMove for e.p.
this.moves.unshift({color: "w", notation: "...", end: {x:-1,y:-1}});
{
// 'end' is required for Board component to check lastMove for e.p.
this.moves.unshift({color: "w", notation: "...", end: {x:-1,y:-1}});