Fix '3 knights' bug + tiny advance on problems tab
[vchess.git] / public / javascripts / variant.js
index f9d23d8..2174c50 100644 (file)
@@ -4,4 +4,12 @@ new Vue({
        // TODO: listen event "show problem", avec le probleme stringifié en arg
        // Alors: display=game, mode=friend, newGame(fen, turn, ...),
        //   et set Instructions+Soluce
+       methods: {
+               toggleDisplay: function(elt) {
+                       if (this.display == elt)
+                               this.display = ""; //hide
+                       else
+                               this.display = elt; //show
+               },
+       },
 });