general option component (canvas size)

This commit is contained in:
2022-01-10 14:16:34 +01:00
parent 1f51d40fcf
commit 737c81c26e
3 changed files with 46 additions and 18 deletions

View File

@ -21,6 +21,8 @@ export default new Vuex.Store({
liveColor: '#000000',
deadColor: '#AA78E8',
},
canvasWidth: 1280,
canvasHeight: 720,
},
mutations: {
update1dRules(state, data) {
@ -29,6 +31,15 @@ export default new Vuex.Store({
setCellProperties(state, data) {
state.cellProperties[data.name] = data.value
},
setDrawingStatus(state, data) {
state.drawing = data
},
setCanvasWidth(state, data) {
state.canvasWidth = data;
},
setCanvasHeight(state, data) {
state.canvasHeight = data;
}
},
getters: {
getCellProperties(state) {
@ -42,6 +53,12 @@ export default new Vuex.Store({
},
isDrawing(state) {
return state.drawing
},
getCanvasWidth(state) {
return state.canvasWidth
},
getCanvasHeight(state) {
return state.canvasHeight
}
},
actions: {