anseki / leader-line

Draw a leader line in your web page.
http://anseki.github.io/leader-line/
MIT License
3.03k stars 423 forks source link

How would I draw a self-loop #353

Closed QadiymStewart closed 2 years ago

QadiymStewart commented 2 years ago

image

Trying to replicate a self-loop but library crashes, how would I go about implementing? Basically, if Source == Target create a loop line.

anseki commented 2 years ago

Hi @QadiymStewart, thank you for the comment. Sorry, my English is poor. What does the "library crashes" mean? Was any error thrown? Also, what is "self-loop"?

QadiymStewart commented 2 years ago

I get the following image

Apart from that I'm trying to re create the line circled in red in previous comment.

anseki commented 2 years ago

That error message means that your code has a bug. Could you show your code?

I couldn't understand the image that was indicated by the red circle. Are there two lines in the circle?

  1. The element "UnknownActivity1" to the element "651"
  2. The element "651" to the element "UnknownActivity1"
anseki commented 2 years ago

If you want to draw a line from an element to the same element (is this "self-loop"?), you can use pointAnchor. For example: https://jsfiddle.net/fhd7bxuo/

anseki commented 2 years ago

No reply came, then this abandoned issue is closed.