pyvis
pyvis copied to clipboard
Clear highlight by clicking on canvas
Currently when Network is called with neighborhood_highlight=False, select_menu=True
, the user is able to highlight neighboring nodes by clicking on a node. However, they can't clear that highlight by clicking on the canvas - they need to use the Reset Selection
button.
This change allows users to clear the neighborhood highlight by clicking on the canvas as well.
(I also set a global highlightActive
variable, because this seems necessary and at some points in testing I got an error without it. I didn't keep good track of what was causing that and can't reproduce it cleanly, but it seemed safer to keep it.)
Fixes #257