2D CA from uploaded picture

This commit is contained in:
Gator
2022-12-15 12:17:27 +01:00
parent 7d4016a213
commit 1a5badaf48
4 changed files with 104 additions and 13 deletions

View File

@ -34,7 +34,7 @@
</template>
<script>
import { mapWritableState } from "pinia";
import { mapActions, mapWritableState } from "pinia";
import { globalStore } from "../stores/index.js";
import MenuRow from "./MenuRow.vue";
export default {
@ -46,6 +46,7 @@
...mapWritableState(globalStore, ["cellProperties"]),
},
methods: {
...mapActions(globalStore, ["setBoardHeight", "setBoardWidth"]),
getCellProperties(event) {
const elem = event.target;
const prop = this.cellProperties;
@ -54,6 +55,8 @@
updateCellProperties(event) {
const elem = event.target;
this.cellProperties[elem.name] = elem.value;
this.setBoardWidth();
this.setBoardHeight();
},
},
};