Hi!
I have a directed graph using network graphs and I'm trying to create a graph where users can hover over a node, and the shortest path is "highlighted" from the start node. I want to also add functionality where users can check in a checkbox and a selected path will be highlighted. I've managed to run the breadth-first search(BFS) algorithm on the graph when a user is hovering over a node or selecting a checkbox.
My issue is that I want to remove/disable the BFS event when a checkbox is selected, but to keep the tooltips on the nodes and activate/allow the BFS to run as expected.
I've tried to disable the states (inactive, selected, hover) in the chartOptions, didn't work. I've tried to update each node with the .update() method and redraw the chart, but noticed some weird behaviour, if I hovered over a node, then checked a checkbox, the hovered node kept the events (the other ones were fine) causing to reset the highlight and unselect the checkbox. I've also tried to write a wrapper around the setState function with no success.
I've made a demo that will hopefully clarify what I'm trying to achieve and what my issue is!
TLTR: I want to disable mouseOver and mouseLeave events while keeping the tooltip on the nodes!
Demo: https://stackblitz.com/edit/react-v8ag29?file=index.js
Thanks!