From 66154387db2c20f15515d10a7220822bd6da1cfb Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Tue, 14 Jan 2014 10:14:16 -0500 Subject: [PATCH] Fix bug in neato -n2 where node xlabels are not translated with everything else. --- lib/neatogen/neatoinit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index 65b77945d..915855194 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -575,6 +575,10 @@ static void translate(Agraph_t * g, pos_edge posEdges) for (n = agfstnode(g); n; n = agnxtnode(g, n)) { ND_pos(n)[0] -= offset.x; ND_pos(n)[1] -= offset.y; + if (ND_xlabel(n) && ND_xlabel(n)->set) { + ND_xlabel(n)->pos.x -= ll.x; + ND_xlabel(n)->pos.y -= ll.y; + } } if (posEdges != NoEdges) { for (n = agfstnode(g); n; n = agnxtnode(g, n)) { -- 2.40.0