projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix games rendering
[vchess.git]
/
client
/
src
/
views
/
Game.vue
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
df5ef6f
..
18a2836
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-216,9
+216,10
@@
export default {
},
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
},
mounted: function() {
document.addEventListener('visibilitychange', this.visibilityChange);
- document
- .getElementById("chatWrap")
- .addEventListener("click", processModalClick);
+ ["chatWrap", "infoDiv"].forEach(eltName => {
+ document.getElementById(eltName)
+ .addEventListener("click", processModalClick);
+ });
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
if ("ontouchstart" in window) {
// Disable tooltips on smartphones:
document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
@@
-757,7
+758,7
@@
export default {
drawSent: this.drawOffer == "sent",
rematchSent: this.rematchOffer == "sent",
score: this.game.score,
drawSent: this.drawOffer == "sent",
rematchSent: this.rematchOffer == "sent",
score: this.game.score,
- score: this.game.scoreMsg,
+ score
Msg
: this.game.scoreMsg,
movesCount: L,
initime: this.game.initime[1 - myIdx] //relevant only if I played
};
movesCount: L,
initime: this.game.initime[1 - myIdx] //relevant only if I played
};
@@
-1040,11
+1041,8
@@
export default {
},
game,
);
},
game,
);
- if (this.gameIsLoading)
- // Re-load game because we missed some moves:
- // artificially reset BaseGame (required if moves arrived in wrong order)
- this.$refs["basegame"].re_setVariables();
- else {
+ this.$refs["basegame"].re_setVariables(this.game);
+ if (!this.gameIsLoading) {
// Initial loading:
this.gotMoveIdx = game.moves.length - 1;
// If we arrive here after 'nextGame' action, the board might be hidden
// Initial loading:
this.gotMoveIdx = game.moves.length - 1;
// If we arrive here after 'nextGame' action, the board might be hidden