option to change drawing direction

This commit is contained in:
2022-01-13 18:07:41 +01:00
parent 6920b8aa5f
commit 032dae7b34
4 changed files with 38 additions and 9 deletions

View File

@ -25,7 +25,8 @@ export default new Vuex.Store({
canvasHeight: 720,
refreshRate: 300,
initial1dState: "onecell",
activeMenu: "Elementary Cellular Automata"
activeMenu: "Elementary Cellular Automata",
drawingDirection: "y"
},
mutations: {
update1dSingleRule(state, data) {
@ -41,13 +42,13 @@ export default new Vuex.Store({
state.drawing = data
},
setCanvasWidth(state, data) {
state.canvasWidth = data;
state.canvasWidth = data
},
setCanvasHeight(state, data) {
state.canvasHeight = data;
state.canvasHeight = data
},
setRefreshRate(state, data) {
state.refreshRate = data;
state.refreshRate = data
},
setInitial1dState(state, data) {
state.initial1dState = data
@ -55,6 +56,9 @@ export default new Vuex.Store({
setActiveMenu(state, data) {
state.activeMenu = data
},
setDrawingDirection(state, data) {
state.drawingDirection = data
},
},
getters: {
getCellProperties(state) {
@ -83,6 +87,9 @@ export default new Vuex.Store({
},
getActiveMenu(state) {
return state.activeMenu
},
getDrawingDirection(state) {
return state.drawingDirection
}
},
actions: {