i liked a global event bus better
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<MenuRow row-title="2D Cellular Automata">
|
||||
<div class="form-field">
|
||||
<label>Start from last result</label>
|
||||
<input type="button" value="start" @click="startFromLast" />
|
||||
<input type="button" value="start" @click="draw2dLast" />
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<input type="button" name="start2d" value="start" @click="draw2d" />
|
||||
@ -40,17 +40,16 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
draw2d() {
|
||||
this.$root.$store.state.drawing = 1;
|
||||
this.$root.$emit("draw2dNew");
|
||||
this.$store.dispatch("draw2d");
|
||||
},
|
||||
draw2dLast() {
|
||||
this.$store.dispatch("draw2dLast");
|
||||
},
|
||||
reset() {
|
||||
this.$root.$emit("reset");
|
||||
this.$store.dispatch("reset");
|
||||
},
|
||||
stop() {
|
||||
this.$root.$emit("stop");
|
||||
},
|
||||
startFromLast() {
|
||||
this.$root.$emit("draw2dLast");
|
||||
this.$store.dispatch("stop");
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user