I need to add custom <line>
and <text>
elements to SVG that is rendered by the mxGraph library.
Does anyone know how to do it (or is it possible at all)?
1 Answers
Answers 1
I've found a workaround for this by creating a text element (label) with 0-length vertex. See http://jgraph.github.io/mxgraph/javascript/examples/labels.html
var v1 = graph.insertVertex(parent, null, 'vertexLabelsMovable', 20, 20, 80, 30); // Places sublabels inside the vertex var label11 = graph.insertVertex(v1, null, 'Label1', 0.5, 1, 0, 0, null, true); var label12 = graph.insertVertex(v1, null, 'Label2', 0.5, 0, 0, 0, null, true);
But, it's still quite bad solution for me.
0 comments:
Post a Comment