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.

Categories

Fixing the order of connectors in a hierarchical graph

0 votes
Hello,

I generate a graphml graph which I read in yEd for obtaining an incremental hierarchic layout.

Is there a way to enforce the order of the connectors on the nodes in yEd, so that the router maintains the inputs from left to right in the north of the node's box according to some attributes which I can place on edges in graphml?

Thank you in advance for some help!

Best Regards,

Lorenzo
in Help by

1 Answer

0 votes

Well, it is possible to force the hierarchical layout algorithm to keep the order of connectors as is. (See "Tools" -> "Constraints" -> "Port Constraints" with "Configuration Method" set to "From Sketch".) Of course, this requires the connectors to be already at the desired geometrical position (relative to the corresponding node). This means you will have to generate appropriate port locations for the edges in your GraphML. E.g. in

<graphml ...>
  ...
  <graph>
  ...
    <edge ...>
      ...
      <data ...>
        <y:PolyLineEdge>
          <y:Path sx="15.0" sy="15.0" tx="-15.0" ty="-15.0">
            ...
          </y:Path>
          ...
        </y:PolyLineEdge>
      </data>
    </edge>
  </graph>
  ...
</graphml>

the sx, sy, tx, and ty attributes specify the edge's source and target port locations (relative to the center of the corresponding source and target node).

by [yWorks] (152k points)
Legal Disclosure | Privacy Policy
...