Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


interpretation of edgeLabel label position information?

0 votes
I am trying to obtain the position information (for nodes, edges, and edge labels) from GraphML files written by yEd (and then draw the graph myself). My approach seems to work for nodes and edges, but somehow the edge label positions are slightly off -- I guess I am missing a piece of the puzzle.

What I currently do:

I use the x, y, width and height attributes, and assume that they point to the left-upper corner of the (bounding box of the) node or edge 'needle'. I then compute the center of the bounding box, and use that as position. This seems to work.

For edge labels, I assume that the (center) point, obtained from the (bounding box represented by) x, y, width, height attributes of y:edgeLabel represents an offset w.r.t. the position of the source-node of the edge, i.e. I add the offset to the source-node position and use the result as the center of the label. This seems to be close, but wrong. Can someone tell me what the right computation is?
in Help by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Legal Disclosure | Privacy Policy