mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
tiny-emitter package is used as "centralized event hub" between vis-network and vue3
This commit is contained in:
@@ -80,10 +80,10 @@ export default {
|
||||
|
||||
},
|
||||
created() {
|
||||
eventHub.$on('add-switch', this.addSwitch)
|
||||
eventHub.on('add-relationship-link', this.addRelationshipLink)
|
||||
},
|
||||
unmounted() {
|
||||
eventHub.$off('add-switch', this.addSwitch)
|
||||
eventHub.off('add-relationship-link', this.addRelationshipLink)
|
||||
},
|
||||
mounted() {
|
||||
console.log('=== mounted: init graph')
|
||||
@@ -124,8 +124,8 @@ export default {
|
||||
console.log('** click on node **')
|
||||
window.network.on('click', callback)
|
||||
},
|
||||
addSwitch(edgeData) {
|
||||
console.log('==> addSwitch <=======================', edgeData)
|
||||
addRelationshipLink(edgeData) {
|
||||
console.log('==> addRelationshipLink <=======================', edgeData)
|
||||
},
|
||||
}
|
||||
/*
|
||||
|
Reference in New Issue
Block a user