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

Cluster Fix #293

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Cluster Fix #293

wants to merge 4 commits into from

Conversation

rewweRrr
Copy link

@rewweRrr rewweRrr commented Apr 3, 2020

fixed
#238

@kykint
Copy link

kykint commented Apr 6, 2020

@cpettitt @lutzroeder Hello, could you help to merge this PR? It supports connection between clusters

@prabirshrestha
Copy link

prabirshrestha commented Aug 17, 2020

This is great. I did find a bug with parallel branch where it is not aligned. G and c should be in the same level.

image

dg = new dagre.graphlib.Graph({compound:true})
  .setGraph({})
  .setDefaultEdgeLabel(function() { return {}; });

// Here we're setting the nodes
dg.setNode('a', {label: 'A', width: 50, height: 50});
dg.setNode('G', {label: 'G', clusterLabelPos: 'top', style: 'fill: #d3d7e8'});
dg.setNode('b', {label: 'B', width: 50, height: 50});
dg.setParent('b', 'G');
dg.setNode('c', {label: 'C', width: 50, height: 50});

// Set up edges, no special attributes.
dg.setEdge('a', 'c');
dg.setEdge('a', 'G');

dagre.layout(dg);

function G(props) {
  return (
    h('div', {},
       dg.nodes().map(v => {
            const node = dg.node(v);
            return h('span', { style: { border: '1px solid grey', textAlign: 'center', position: 'absolute', width: node.width, height: node.height, top: node.y, left: node.x, background: 'transparent' } }, v)
        }))
  );
};

ReactDOM.render(
    h(G, null),
    document.getElementById('raw-graph')
);

georgefst added a commit to georgefst/dagre that referenced this pull request Jul 22, 2022
@georgefst
Copy link

This stops things from crashing completely, but I still get weird, off-centre results.

Also, it's impossible to tell from the code or the commit history exactly how this patch intends to fix the issue. More documentation would surely be needed somewhere for this to become mergeable.

@zeyupan888
Copy link

Hello, is this commit solving the issue?
I tried @dagrejs/dagre which is another version with maintenance, but still bug there.

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

Successfully merging this pull request may close these issues.

5 participants