working vue components for 2D automata

This commit is contained in:
2022-01-10 13:50:02 +01:00
parent 4f26becf9f
commit 1f51d40fcf
4 changed files with 47 additions and 4 deletions

View File

@ -2,22 +2,24 @@
<MenuRow row-title="2D Cellular Automata">
<div class="form-field">
<input
id="start2d"
type="button"
name="start2d"
value="start"
@click="draw2d"
>
<input
type="button"
name="stop"
class="stop"
value="stop"
@click="stop"
>
<input
type="button"
name="reset"
class="reset"
value="reset"
@click="reset"
>
</div>
</MenuRow>
@ -29,6 +31,18 @@ export default {
name: 'Menu2dCA',
components: {
MenuRow
},
methods: {
draw2d() {
this.$root.$store.state.drawing = 1
this.$root.$emit('draw2d')
},
reset() {
this.$root.$emit('reset')
},
stop() {
this.$root.$emit('stop')
},
}
}
</script>