'update'
[vchess.git] / client / src / views / Analyze.vue
index cecb773..a1352f7 100644 (file)
@@ -1,7 +1,11 @@
 <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
+      #fenDiv(v-if="!!vr") {{ vr.getFen() }}
+  .row
+    .col-sm-12.col-md-10.col-md-offset-1
+      BaseGame(:game="game" :vr="vr" ref="basegame")
 </template>
 
 <script>
@@ -49,6 +53,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...
     },
   },
 };