Behavior of getSuccessors() #1746
-
I made a small demo [0] that is using Note that, however, in this demo I'm guessing that [0] - https://codesandbox.io/s/jointjs-dom-graph-forked-fptgmd |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
The What the
That means you'll have to write your own function to find all successors (see EDIT: |
Beta Was this translation helpful? Give feedback.
-
Hi Roman!
I stand corrected. I mentally built the concepts "in" and "out" ports because I'm used to differentiate them that way in the project I'm working on.
Indeed, I posted an incomplete demo. Let me post a fixed demo, just in case somebody in the future finds this useful: https://codesandbox.io/s/jointjs-dom-graph-forked-slj4gt In the new demo I have applied the following fixes:
This doesn't match what the docs state nor the tests that I have been performing. It doesn't make any sense for ancestors to even be considered in a method called If I understand you correctly, Can you please double check the documentation of the |
Beta Was this translation helpful? Give feedback.
-
IMHO, in your first example, If I had the following graph:
What would the successors of
This sounds strange, since In your 3rd example, IMHO, the successors of I guess that the |
Beta Was this translation helpful? Give feedback.
IMHO, in your first example,
C
andD
being successors ofA
doesn't sound logical, even ifdeep
is set totrue
. The successors ofA
should be any elements that are connected toA
. Ifdeep
is set totrue
, nested elements should also be considered. But in no reasonable way the parent ofA
should be considered as a starting point when traversing the graph. Even the semantics of the worddeep
already provide enough evidence that the direction of the traversal should godown / deep
, notup / narrow
.If I had the following graph: