From: ellson Date: Tue, 4 Mar 2008 04:28:12 +0000 (+0000) Subject: use "nojustify" to suppress horizontal justification only. don't affect labelloc X-Git-Tag: LAST_LIBGRAPH~32^2~4583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20cc33a6f54b612069eef6aa398a29c0cff74cde;p=graphviz use "nojustify" to suppress horizontal justification only. don't affect labelloc --- diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 1e8e34e89..13bfb2406 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -842,15 +842,15 @@ static void poly_init(node_t * n) if (!mapbool(late_string(n, N_nojustify, "false"))) { if (width > dimen.x) ND_label(n)->d.x = width - dimen.x; - if (height > dimen.y) { - p = agget(n, "labelloc"); - if (p && (p[0] == 'b')) - ND_label(n)->d.y = -(height - dimen.y); - else if (p && (p[0] == 't')) - ND_label(n)->d.y = height - dimen.y; - else - ND_label(n)->d.y = 0; - } + } + if (height > dimen.y) { + p = agget(n, "labelloc"); + if (p && (p[0] == 'b')) + ND_label(n)->d.y = -(height - dimen.y); + else if (p && (p[0] == 't')) + ND_label(n)->d.y = height - dimen.y; + else + ND_label(n)->d.y = 0; } /* increase node size to width/height if needed */