Fix. TODO: Vue reactivity on game.score and game. ...
[vchess.git] / client / src / views / Analyze.vue
index cecb773..cd25c25 100644 (file)
@@ -1,7 +1,8 @@
 <template lang="pug">
-.row
-  .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
-    BaseGame(:game="game" :vr="vr" ref="basegame")
+main
+  .row
+    .col-sm-12.col-md-10.col-md-offset-1
+      BaseGame(:game="game" :vr="vr" ref="basegame")
 </template>
 
 <script>
@@ -49,6 +50,9 @@ export default {
       const vModule = await import("@/variants/" + this.game.vname + ".js");
       window.V = vModule.VariantRules;
       this.vr = new V(this.game.fen);
+      // fenStart initialized in the end, after definition of V,
+      // because it triggers a reset on BaseGame component.
+      this.$set(this.game, "fenStart", this.gameRef.fen); //TODO: Vue3...
     },
   },
 };