Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't "pull nodes into" a subgraph #40

Open
gordonwoodhull opened this issue Apr 10, 2019 · 0 comments
Open

can't "pull nodes into" a subgraph #40

gordonwoodhull opened this issue Apr 10, 2019 · 0 comments

Comments

@gordonwoodhull
Copy link

gordonwoodhull commented Apr 10, 2019

In graphviz, the following are equivalent

digraph g {
  subgraph cluster_SG { a -> b}
  a -> c
}
digraph g {
  a -> b
  subgraph cluster_SG { a b }
  a -> c
}

In other words, a node doesn't have to be first declared within a subgraph to be a member of the subgraph; it can be "pulled into" a subgraph by declaring it again within the subgraph.

However, parsing the second example with graphlib-dot, cluster_SG doesn't get declared at all, and a and b are children of the top-level graph. I haven't looked into the code yet, but it seems that the later declarations are ignored, and the subgraph ends up empty and is discarded.

I know the dagre clustering implementation is incomplete, but I hope to read the files anyway, in order to draw the clusters using other algorithms.

I hope to take a look into fixing this, but wanted to post an issue first in case anyone has any clues about this. Thanks!

@gordonwoodhull gordonwoodhull changed the title can't can't "pull" nodes into a subgraph Apr 10, 2019
@gordonwoodhull gordonwoodhull changed the title can't "pull" nodes into a subgraph can't "pull nodes into" a subgraph Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant