pyvis icon indicating copy to clipboard operation
pyvis copied to clipboard

Clear highlight by clicking on canvas

Open HebeHH opened this issue 1 year ago • 0 comments

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

HebeHH avatar Nov 10 '23 14:11 HebeHH