]> granicus.if.org Git - graphviz/commitdiff
Revert version ffb894f27874ebd510a8555c28083d6e01eb80b6. The fix broke other input... untagged-348619a7ff77176f7492
authorEmden Gansner <emdenrg@google.com>
Thu, 3 Nov 2016 20:57:52 +0000 (16:57 -0400)
committerEmden Gansner <emdenrg@google.com>
Thu, 3 Nov 2016 20:57:52 +0000 (16:57 -0400)
Plus it didn't fix the problem of repeated ids. We need to rethink how to handle anchors.

lib/common/emit.c
lib/common/htmltable.c

index 09bcd34b5e17c988b5980b91442db25cbc0d0415..e8ad87dfceeda0ff5f2e56c7076fb043c0faf867 100644 (file)
@@ -1984,14 +1984,8 @@ static void emit_node(GVJ_t * job, node_t * n)
 
        emit_begin_node(job, n);
        ND_shape(n)->fns->codefn(job, n);
-       if (ND_xlabel(n) && ND_xlabel(n)->set) {
-           obj_state_t *obj = push_obj_state(job);
-           obj->type = NODE_OBJTYPE;
-           obj->u.n = n;
-           obj->emit_state = EMIT_NDRAW;
+       if (ND_xlabel(n) && ND_xlabel(n)->set)
            emit_label(job, EMIT_NLABEL, ND_xlabel(n));
-           pop_obj_state(job);
-       }
        emit_end_node(job);
     }
 }
index d81e04bc88e64ad8e1c1302f4a78eacdf326fb14..8962f813463b6b80fb31ef118960be984b2988db 100644 (file)
@@ -545,7 +545,7 @@ static void emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env)
     pts.UR.y += pos.y;
 
     if (doAnchor && !(job->flags & EMIT_CLUSTERS_LAST))
-       anchor = initAnchor(job, env, &tbl->data, pts, &saved, 0);
+       anchor = initAnchor(job, env, &tbl->data, pts, &saved, 1);
     else
        anchor = 0;
 
@@ -582,26 +582,13 @@ static void emit_html_tbl(GVJ_t * job, htmltbl_t * tbl, htmlenv_t * env)
                emit_html_rules(job, cp, env, tbl->data.pencolor, *cells);
        }
 
-       if (tbl->data.border) {
-           if (anchor) {
-               agxbuf xb;
-               obj_state_t *obj = job->obj;
-               unsigned char buf[SMALLBUF];
-               agxbinit(&xb, SMALLBUF, buf);
-               agxbput(&xb, obj->id);
-               agxbputc(&xb, 'b');
-               char* id = agxbuse(&xb);
-               gvrender_begin_anchor(job,
-                             obj->url, obj->tooltip, obj->target,
-                             id);
-               agxbfree(&xb);
-           }
+       if (tbl->data.border)
            doBorder(job, &tbl->data, pts);
-       }
+
     }
 
     if (anchor)
-       endAnchor(job, &saved, 0);
+       endAnchor(job, &saved, 1);
 
     if (doAnchor && (job->flags & EMIT_CLUSTERS_LAST)) {
        if (initAnchor(job, env, &tbl->data, pts, &saved, 0))
@@ -658,7 +645,7 @@ static void emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env)
     pts.UR.y += pos.y;
 
     if (doAnchor && !(job->flags & EMIT_CLUSTERS_LAST))
-       inAnchor = initAnchor(job, env, &cp->data, pts, &saved, 0);
+       inAnchor = initAnchor(job, env, &cp->data, pts, &saved, 1);
     else
        inAnchor = 0;
 
@@ -688,7 +675,7 @@ static void emit_html_cell(GVJ_t * job, htmlcell_t * cp, htmlenv_t * env)
     }
 
     if (inAnchor)
-       endAnchor(job, &saved, 0);
+       endAnchor(job, &saved, 1);
 
     if (doAnchor && (job->flags & EMIT_CLUSTERS_LAST)) {
        if (initAnchor(job, env, &cp->data, pts, &saved, 0))