Merge remote-tracking branch 'origin/dev' into load-picture

This commit is contained in:
2022-12-11 14:18:37 +01:00
5 changed files with 63 additions and 42 deletions

View File

@ -36,6 +36,8 @@ export const globalStore = defineStore("globalStore", {
reset: false,
canDraw: true,
picture: null,
mainMenu: false,
activeSubMenu: "",
};
},
actions: {
@ -48,14 +50,20 @@ export const globalStore = defineStore("globalStore", {
);
},
toggleDraw1d() {
this.setActiveSubMenu("");
this.setMainMenu(false);
this.draw1d = true;
},
toggleDraw2d() {
this.setActiveSubMenu("");
this.setMainMenu(false);
this.toggleStop();
this.canDraw = true;
this.draw2d = true;
},
toggleDraw2dLast() {
this.setActiveSubMenu("");
this.setMainMenu(false);
this.toggleStop();
this.canDraw = true;
this.draw2dLast = true;
@ -77,5 +85,12 @@ export const globalStore = defineStore("globalStore", {
this.draw2dpicture = false;
this.canDraw = false;
},
setActiveSubMenu(data) {
if (this.activeSubMenu == data) this.activeSubMenu = "";
else this.activeSubMenu = data;
},
setMainMenu(data) {
this.mainMenu = data;
},
},
});