I use react-graph-vis to visualize networks. According to vis.js documentation, I can enable the manipulation system by providing the corresponding manipulationobject to the key options. I am trying to add a button Add Edgeto the visualization GUI, and this is more or less how I configured my component:
class MyComponent extends React.Component {
constructor(props) {
var graph = ;
this.state = {
options: {
manipulation: {
enabled: true, initiallyActive: true, addEdge: true
}
},
graph: graph
}
}
render() {
return <Graph graph={this.state.graph}, options={this.state.options}/>
}
}
graph, . manipulation options . , edit Add Edge, . , , . (, ) . , manipulation .