docs: improve graph.getSuccessors() documentation

This issue has been tracked since 2022-07-23.

Discussed in #1746

Originally posted by alexandernst July 21, 2022
I made a small demo [0] that is using getSuccessors() to find all the elements that are connected to an element.
If I understand the docs correctly, getSuccessors() might consider visiting embedded elements if the deep opt is set to true.

Note that, however, in this demo getSuccessors() is returning 3 children (blue, orange and red in the console). The red element is embedded inside the orange element and it's connected to the "in" port of the orange element.

I'm guessing that getSuccessors() doesn't really care if the port are "in" or "out" and just follows any links it can find.
If this is the expected behavior, is there a way I can prevent getSuccessors() from following links which's source is an "in" port?

[0] - https://codesandbox.io/s/jointjs-dom-graph-forked-fptgmd

More Details About Repo
Owner Name clientIO
Repo Name joint
Full Name clientIO/joint
Language JavaScript
Created Date 2009-09-11
Updated Date 2022-12-03
Star Count 3715
Watcher Count 155
Fork Count 817
Issue Count 51

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date