visgraph: add hover interaction

This commit is contained in:
Mathieu Jaumotte 2021-11-01 09:49:55 +01:00
parent a57a23dc49
commit 869e442c2c
2 changed files with 12 additions and 4 deletions

View File

@ -294,7 +294,7 @@ const store = createStore({
arrows: 'to', arrows: 'to',
color: 'lightblue', color: 'lightblue',
font: { color: '#33839d' }, font: { color: '#33839d' },
dashes: true, dashes: true, //physics: false,
label: getRelationshipLabel(r, false), label: getRelationshipLabel(r, false),
title: getRelationshipTitle(r), title: getRelationshipTitle(r),
}) })
@ -316,7 +316,7 @@ const store = createStore({
commit('addPerson', adapt2vis(person, { folded: true })) commit('addPerson', adapt2vis(person, { folded: true }))
console.log('********* fetch infos for missing', person.id, '******') console.log('********* fetch infos for missing', person.id, '******')
dispatch('fetchInfoForPerson', person) //dispatch('fetchInfoForPerson', person)
}, },
} }
}) })

View File

@ -69,6 +69,16 @@ window.options = {
adaptiveTimestep: true, adaptiveTimestep: true,
wind: { x: 0, y: 0 } wind: { x: 0, y: 0 }
}, },
interaction: {
hover: true,
keyboard: {
enabled: true,
speed: {x: 3, y: 3, zoom: 0.02},
bindToWindow: false
},
multiselect: true,
navigationButtons: false
},
manipulation: { manipulation: {
enabled: true, enabled: true,
initiallyActive: true, initiallyActive: true,
@ -115,7 +125,6 @@ window.options = {
} }
}, },
nodes: { nodes: {
//physics: true,
borderWidth: 1, borderWidth: 1,
borderWidthSelected: 3, borderWidthSelected: 3,
font: { font: {
@ -123,7 +132,6 @@ window.options = {
} }
}, },
edges: { edges: {
//physics: true,
font: { font: {
color: '#b0b0b0', color: '#b0b0b0',
size: 9, size: 9,