From 5d7f4bde1d3df4e3de2e31873d0f247a04b00563 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 3 Nov 2021 21:17:25 +0100 Subject: [PATCH] minor stuffs --- .../Resources/public/vuejs/VisGraph/App.vue | 12 +++++++++- .../public/vuejs/VisGraph/vis-network.js | 23 ++++--------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue index 2c7fe9026..64e75bad9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/App.vue @@ -2,8 +2,8 @@ -
@@ -243,6 +243,10 @@ export default { this.forceUpdateComponent() } break + case 'household': + let household = this.nodes.filter(n => n.id === data.nodes[0])[0] + console.log('######## event on selected Household Node ########', household.id, household) + 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) @@ -253,6 +257,12 @@ export default { throw 'this node type is undefined' } }) + + /* + window.network.on('selectEdge', (data) => { + console.log('######## event onSelectEdge ########', data) + }) + */ }, forceUpdateComponent() { console.log('forceUpdateComponent') 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 907f64062..2160d51bd 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js @@ -80,15 +80,17 @@ window.options = { speed: {x: 3, y: 3, zoom: 0.02}, bindToWindow: false }, - navigationButtons: false multiselect: false, + navigationButtons: false, + tooltipDelay: 300, }, manipulation: { enabled: true, initiallyActive: false, addNode: false, - //editNode: function(nodeData, callback) { callback(nodeData) }, + //editNode: function(nodeData, callback) { callback(nodeData) }, //disabled if undefined deleteNode: false, + // TODO see alternative with 'Manipulation methods to use the manipulation system without GUI.' addEdge: function(edgeData, callback) { if ( splitId(edgeData.from,'type') === 'person' @@ -113,23 +115,8 @@ window.options = { console.log('deleteEdge', edgeData) // array with edges id eventHub.emit('delete-relationship-modal', edgeData) callback(edgeData) - }, - controlNodeStyle: { - /* - shape:'dot', - size: 6, - color: { - background: '#ff0000', - border: '#3c3c3c', - highlight: { - background: '#07f968', - border: '#3c3c3c' - } - }, - borderWidth: 2, - borderWidthSelected: 2 - */ } + // end TODO }, nodes: { borderWidth: 1,