- toggleDisplay: function(elt) {
- if (this.display == elt)
- {
- this.display = ""; //hide
- setCookie("display-"+variant, "");
- }
- else
- {
- this.display = elt; //show
- setCookie("display-"+variant, elt);
- }
- },
- showProblem: function(problemTxt) {
- this.problem = JSON.parse(problemTxt);
- this.display = "game";
+ setDisplay: function(elt) {
+ this.display = elt;
+ // Close menu on small screens:
+ let menuToggle = document.getElementById("drawer-control");
+ if (!!menuToggle)
+ menuToggle.checked = false;