mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
visgraph: no more need for tiny emitter. remove it
This commit is contained in:
parent
a63e1321b0
commit
7dc9021eca
@ -455,21 +455,7 @@ export default {
|
||||
throw "uncaught action"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
/// Tiny emitter events
|
||||
created() {
|
||||
eventHub.on('add-relationship-modal', this.addRelationshipModal)
|
||||
eventHub.on('edit-relationship-modal', this.editRelationshipModal)
|
||||
eventHub.on('delete-relationship-modal', this.deleteRelationshipModal)
|
||||
},
|
||||
unmounted() {
|
||||
eventHub.off('add-relationship-modal', this.addRelationshipModal)
|
||||
eventHub.off('edit-relationship-modal', this.editRelationshipModal)
|
||||
eventHub.off('delete-relationship-modal', this.deleteRelationshipModal)
|
||||
}
|
||||
*/
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { visMessages } from './i18n'
|
||||
//import { TinyEmitter } from "tiny-emitter";
|
||||
|
||||
/**
|
||||
* Vis-network initial data/configuration script
|
||||
@ -8,9 +7,6 @@ import { visMessages } from './i18n'
|
||||
* cfr. https://github.com/almende/vis/issues/2524#issuecomment-307108271
|
||||
*/
|
||||
|
||||
//console.log('@@@ init eventHub App @@@')
|
||||
//window.eventHub = new TinyEmitter()
|
||||
|
||||
window.network = {}
|
||||
|
||||
window.options = {
|
||||
@ -82,39 +78,7 @@ window.options = {
|
||||
enabled: false,
|
||||
initiallyActive: false,
|
||||
addNode: false,
|
||||
deleteNode: false,
|
||||
/*
|
||||
//disabled if undefined
|
||||
//editNode: function(nodeData, callback) { callback(nodeData) },
|
||||
|
||||
// TODO see alternative with 'Manipulation methods to use the manipulation system without GUI.'
|
||||
addEdge: function(edgeData, callback) {
|
||||
if (
|
||||
splitId(edgeData.from,'type') === 'person'
|
||||
&& splitId(edgeData.to,'type') === 'person'
|
||||
) {
|
||||
console.log('callback addEdge', edgeData)
|
||||
eventHub.emit('add-relationship-modal', edgeData)
|
||||
callback(edgeData)
|
||||
}
|
||||
},
|
||||
editEdge: function(edgeData, callback) {
|
||||
if (
|
||||
splitId(edgeData.from,'type') === 'person'
|
||||
&& splitId(edgeData.to,'type') === 'person'
|
||||
) {
|
||||
console.log('callback editEdge', edgeData)
|
||||
eventHub.emit('edit-relationship-modal', edgeData)
|
||||
callback(edgeData)
|
||||
}
|
||||
},
|
||||
deleteEdge: function(edgeData, callback) {
|
||||
console.log('callback deleteEdge', edgeData) // array with edges id
|
||||
eventHub.emit('delete-relationship-modal', edgeData)
|
||||
callback(edgeData)
|
||||
}
|
||||
// end TODO
|
||||
*/
|
||||
deleteNode: false
|
||||
},
|
||||
nodes: {
|
||||
borderWidth: 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user