hide main menu once start is clicked (mobile)

This commit is contained in:
2022-12-10 21:40:45 +01:00
parent 6004651963
commit 89d7d78284
4 changed files with 26 additions and 12 deletions

View File

@ -1,6 +1,14 @@
<template>
<MenuRow row-title="Elementary Automaton">
<form>
<div class="form-field">
<input
type="button"
name="start"
value="start"
@click="toggleDraw1d()"
/>
</div>
<div class="form-field">
<label>
Initial state presets
@ -62,9 +70,6 @@
</label>
</div>
</form>
<div class="form-field">
<input type="button" name="start" value="start" @click="toggleDraw1d()" />
</div>
</MenuRow>
</template>

View File

@ -30,7 +30,7 @@
window.removeEventListener("click", this.onWindowClick);
},
methods: {
...mapActions(globalStore, ["setActiveSubMenu"]),
...mapActions(globalStore, ["setActiveSubMenu", "toggleMainMenu"]),
onKeyDown: function (event) {
// escape
if (event.keyCode == 27) {
@ -47,6 +47,7 @@
if (form != null) {
if (!form.contains(event.target)) {
this.setActiveSubMenu("");
this.setMainMenu(false);
}
return;
}