jacomyal / sigma.js

A JavaScript library aimed at visualizing graphs of thousands of nodes and edges
https://www.sigmajs.org/
MIT License
11.3k stars 1.59k forks source link

Allow more ways to disable/enable labels for edges #1479

Open nadeem-clearaccept opened 4 weeks ago

nadeem-clearaccept commented 4 weeks ago

As of right now, it seems like I can't disable edge label. As of right now, when hovering over a node, the edge label rendering is causing a performance issue (causing a bit of stuttering on the node hover).

Ideally, I would wish to have the edge labels only show up if a node is selected. I tried to remove the labels and add them back on in the edgeReducer, but it seems like even if there is no label, the performance hit is still there if edge label is enabled.

Ideally, by enabling and disabling the edge label at certain points (when there is less nodes on the screen for example), would improve the performance.

jacomyal commented 4 weeks ago

Oh, good catch! I haven't displayed edge labels with graphs that are large enough to cause this kind of performance issues yet. I'll investigate this when I can. Thanks for the report!