minor stuffs

This commit is contained in:
Mathieu Jaumotte 2021-11-03 21:17:25 +01:00
parent 40c5322cba
commit 5d7f4bde1d
2 changed files with 16 additions and 19 deletions

View File

@ -2,8 +2,8 @@
<!-- TEST appelle la fonction sans passer par le callback de vis-network
<button class="btn btn-sm btn-create" @click="addRelationshipModal({ from: 'person_1617', to: 'person_1614' })">add link</button>
<=== InternalError: too much recursion
-->
<!--// <=== InternalError: too much recursion -->
<div id="visgraph"></div>
@ -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')

View File

@ -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,