concernement's entitées are now matter body parts AND mouseoverable & clickable

This commit is contained in:
2023-04-18 21:55:44 +02:00
parent a2ae70ef48
commit 440e6d9f15
4 changed files with 73 additions and 45 deletions

View File

@@ -83,13 +83,16 @@ export const ConcernementsStore = defineStore({
})
},
openCloseConcernement (id, state) {
// console.log('openCloseConcernement', id, state);
this.concernementsByID[id].opened = state;
if (state) {
this.opened = this.concernementsByID[id];
this.router.push({name: 'concernement', params: {id: id}});
}
openCloseConcernements (ids) {
var state;
this.concernements.forEach((c, i) => {
state = ids.indexOf(c.id) !== -1;
this.concernements[i].opened = this.concernementsByID[c.id].opened = state;
if (state) {
this.opened = c;
this.router.push({name: 'concernement', params: {id: c.id}});
}
});
},
resetConcernementOpened () {
this.opened = null;