visgraph: an event trigger unfoldPersonsByCourse (store)

This commit is contained in:
2021-11-03 21:15:37 +01:00
parent 8ab0fd59f8
commit 40c5322cba
2 changed files with 39 additions and 3 deletions

View File

@@ -219,6 +219,7 @@ export default {
this.initGraph()
this.listenOnGraph()
this.getRelationsList()
this.forceUpdateComponent()
},
methods: {
initGraph() {
@@ -237,6 +238,16 @@ export default {
case 'person':
let person = this.nodes.filter(n => n.id === data.nodes[0])[0]
console.log('@@@@@@@@ event on selected Person Node @@@@@@@@', person.id, person)
if (person.label === null) {
this.$store.commit('unfoldPerson', person)
this.forceUpdateComponent()
}
break
case 'accompanying_period':
let course = this.nodes.filter(n => n.id === data.nodes[0])[0]
console.log('&&&&&&&& event on selected AccompanyingCourse Node &&&&&&&&', course.id, course)
this.$store.dispatch('unfoldPersonsByCourse', course)
this.forceUpdateComponent()
break
default:
throw 'this node type is undefined'