jacomyal / sigma.js

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

about loop edge, curved edge, quadratic edge #1407

Open nesimii opened 4 months ago

nesimii commented 4 months ago

Greetings to the Sigma js team,

I was using the curved edge codes I found sample code another repo on Github, but it was not working properly. I saw that you added curved edge in v3 version, thank you. I offer two feature suggestions from you;

  1. Can you add quadratic bezier edge arrow?

  2. Is it possible to add loop edge in addition? In the system I use, there can be more than one loop edge on a node.

images

jacomyal commented 4 months ago

The new @sigma/edge-curve is supposed to draw quadratic Bézier curves. Can you precise how it is not working properly please?

Also, about the other questions:

  1. For the arrow, the hardest part is to "stop" the curve "before" the target node. It is possible, but not a priority right now.
  2. Self loops should indeed come at some point. I'll leave this ticket open for this very feature for now.
nesimii commented 4 months ago

I guess I didn't explain it properly. I am using 'sigma v2.4.0' version, I haven't used 'v3' version because it is in beta. I found sample code on github for curved edges. so the sample code is not working properly.

There is a sample code for loop edges, if you want to examine it; https://github.com/SpecterOps/BloodHound/commit/47bdcbaf2e269b4e0cf54f6277fec64aaf4a2f37#diff-2e356fea35ac46e0612aab930e14483eeacbd3b08248035ea167e5cd76198962