space alloted for these is not part of the drawing and can cause too much
space around the graph. Spline control points have always been used in the
bb calculation. The only other change to is to make sure ordinary edge
labels are included in the bb.
/* place regular edge labels */
for (n = GD_nlist(g); n; n = ND_next(n)) {
- if ((ND_node_type(n) == VIRTUAL) && (ND_label(n)))
+ if ((ND_node_type(n) == VIRTUAL) && (ND_label(n))) {
place_vnlabel(n);
+ updateBB(g, ND_label(n));
+ }
}
/* normalize splines so they always go from tail to head */
continue;
if ((v = GD_rank(g)[r].v[0]) == NULL)
continue;
- x = ND_coord_i(v).x - ND_lw_i(v);
- LL.x = MIN(LL.x, x);
+ if (ND_node_type(v) == NORMAL) {
+ x = ND_coord_i(v).x - ND_lw_i(v);
+ LL.x = MIN(LL.x, x);
+ }
v = GD_rank(g)[r].v[GD_rank(g)[r].n - 1];
- x = ND_coord_i(v).x + ND_rw_i(v);
- UR.x = MAX(UR.x, x);
+ if (ND_node_type(v) == NORMAL) {
+ x = ND_coord_i(v).x + ND_rw_i(v);
+ UR.x = MAX(UR.x, x);
+ }
}
offset = CL_OFFSET;
for (c = 1; c <= GD_n_cluster(g); c++) {