update board dimensions after window resize
This commit is contained in:
@ -37,6 +37,14 @@ export const globalStore = defineStore("globalStore", {
|
||||
};
|
||||
},
|
||||
actions: {
|
||||
setBoardWidth() {
|
||||
this.boardWidth = Math.floor(this.canvasWidth / this.cellProperties.size);
|
||||
},
|
||||
setBoardHeight() {
|
||||
this.boardHeight = Math.floor(
|
||||
this.canvasHeight / this.cellProperties.size
|
||||
);
|
||||
},
|
||||
toggleDraw1d() {
|
||||
this.draw1d = true;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user