Improve horizontal layout for better edges ##graph

This commit is contained in:
pancake 2019-05-14 03:31:25 +02:00
parent de8a39dd54
commit f51575cd87

View File

@ -1816,7 +1816,7 @@ static void backedge_info (RAGraph *g) {
int l = (ax - min) + (bx - min);
int r = (max - ax) + (max - bx);
for (k = b->layer; k <= a->layer; k++) {
for (k = b->layer; k <= a->layer; k++) {
if (r < l) {
arr[k][1] = max + 1;
} else {
@ -2014,7 +2014,7 @@ static void set_layout(RAGraph *g) {
n->y = 1;
for (k = 0; k < j; k++) {
RANode *m = get_anode (g->layers[i].nodes[k]);
n->y += m->h + VERTICAL_NODE_SPACING;
n->y -= (m->h + VERTICAL_NODE_SPACING);
}
}
}