diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue index 3cd3de56d..7ad449dc8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue @@ -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) } - */ } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js index 082d35b15..e95bc0d0b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js @@ -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,