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

Calculate same-layer crossings #272

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

Conversation

anyazz
Copy link

@anyazz anyazz commented Jun 28, 2019

Followup to pull request #271. Since edges between nodes with the same (manually determined) rank become possible, this adds a function for counting crossings within a single layer.
Since singleLayerCrossCount() requires graph to be defined using nodes, the second commit fixes failing tests in cross-count-test.js and adds a new one.

@anyazz anyazz marked this pull request as ready for review July 1, 2019 10:14
@Morragan
Copy link

Morragan commented May 25, 2020

Is this a complete solution for dagre to be able to compute a layout with nodes having the same rank? In that case it doesn't seem to work, I'm getting a following error, caused by y coordinate having a value of NaN:

Uncaught Error: Not possible to find intersection inside of the rectangle
    at Object.intersectRect (dagre.js:2865)
    at dagre.js:736
    at arrayEach (dagre.js:4497)
    at Object.forEach (dagre.js:9563)
    at assignNodeIntersects (dagre.js:723)
    at dagre.js:520
    at notime (dagre.js:2996)
    at runLayout (dagre.js:520)
    at dagre.js:477
    at notime (dagre.js:2996)

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.

2 participants