)
#turnIndicator(v-if="showTurn") {{ turn }}
#controls
- button(@click="gotoBegin()") <<
- button(@click="undo()") <
- button(v-if="canFlip" @click="flip()") ⇅
- button(@click="play()") >
- button(@click="gotoEnd()") >>
+ button(@click="gotoBegin()")
+ img.inline(src="/images/icons/fast-forward_rev.svg")
+ button(@click="undo()")
+ img.inline(src="/images/icons/play_rev.svg")
+ button(v-if="canFlip" @click="flip()")
+ img.inline(src="/images/icons/flip.svg")
+ button(@click="play()")
+ img.inline(src="/images/icons/play.svg")
+ button(@click="gotoEnd()")
+ img.inline(src="/images/icons/fast-forward.svg")
#belowControls
#downloadDiv(v-if="allowDownloadPGN")
a#download(href="#")
| {{ st.tr["Rules"] }}
#movesList
MoveList(
- v-if="showMoves != 'none'"
:show="showMoves"
:score="game.score"
:message="game.scoreMsg"
this.lastMove = null;
},
analyzePosition: function() {
- const newUrl =
+ let newUrl =
"/analyse/" +
this.game.vname +
"/?fen=" +
this.vr.getFen().replace(/ /g, "_");
+ if (this.game.mycolor)
+ newUrl += "&side=" + this.game.mycolor;
// Open in same tab in live games (against cheating)
if (this.game.type == "live") this.$router.push(newUrl);
else window.open("#" + newUrl);
let movingPiece = document.querySelector(
"#" + getSquareId(move.start) + " > img.piece"
);
+ // For some unknown reasons Opera get "movingPiece == null" error
+ // TOOO: is it calling 'animate()' twice ? One extra time ?
+ if (!movingPiece) return;
// HACK for animation (with positive translate, image slides "under background")
// Possible improvement: just alter squares on the piece's way...
const squares = document.getElementsByClassName("board");
}
};
const playMove = () => {
- const animate = V.ShowMoves == "all" && received;
+ const animate = V.ShowMoves == "all" && (received || navigate);
if (!Array.isArray(move)) move = [move];
let moveIdx = 0;
let self = this;
const message = getScoreMessage(score);
if (!navigate && this.game.mode != "analyze")
this.$emit("gameover", score, message);
- // Just show score on screen (allow undo)
- else this.showEndgameMsg(score + " . " + this.st.tr[message]);
+ else if (this.game.mode == "analyze")
+ // Just show score on screen (allow undo)
+ this.showEndgameMsg(score + " . " + this.st.tr[message]);
}
if (!navigate && this.game.mode != "analyze") {
const L = this.moves.length;
#controls
margin: 0 auto
text-align: center
+ display: flex
button
display: inline-block
width: 20%
margin: 0
+ img.inline
+ height: 24px
+ padding-top: 5px
+ @media screen and (max-width: 767px)
+ img.inline
+ height: 18px
#turnIndicator
text-align: center