Commit | Line | Data |
---|---|---|
1 | new Vue({ | |
2 | el: "#variantPage", | |
3 | data: { | |
4 | display: "game", //default: play! | |
5 | problem: undefined, //current problem in view | |
6 | }, | |
7 | methods: { | |
8 | showProblem: function(problemTxt) { | |
9 | this.problem = JSON.parse(problemTxt); | |
10 | this.display = "game"; | |
11 | }, | |
12 | setDisplay: function(elt) { | |
13 | this.display = elt; | |
14 | document.getElementById("drawer-control").checked = false; | |
15 | }, | |
16 | }, | |
17 | }); |