netwulf
netwulf copied to clipboard
When nodes are dragged, labels stay on for that node
Not sure if I am interacting with netwulf incorrectly, but after running the following code,
import networkx as nx
from netwulf import visualize
G = nx.barabasi_albert_graph(100,2)
visualize(G)
with "Display labels" off, when I drag a node in the visualization, the label stays on the node, even if I click it again. If I don't drag the node, then I can toggle the label on and off just fine. The only way to hide the label on that node again is to turn on the "Display labels" and then turn it off again.
Very minimal importance, but it was unexpected behavior, so I figured I would bring it up.
Great project!
hi! yes, this annoys me as well. Thanks for bringing it up. We'll make sure to address this soon-ish!
It because a drag event is unavoidably also a click event in d3. I tried fixing this a while back but dropped it because of more important issues. The easy fix is to just check if the node moved before a node gets a label, but I need to sit down and implement it in a good way. Traveling at the moment, but will see to this in a matter of weeks.
maybe we could switch labels on and off by pressing 'L' when hovering?
I see. You want to substitute a mouseclick for an 'L' click?
I'll admit it's not very intuitive
I understand why a drag event is also a click event, but my bigger question is, Why can't you toggle off the label if the node has been dragged, while you can if it's a simple click?