nadavrot / layout

Layout is a rust library and a tool that renders Graphviz dot files.
MIT License
658 stars 39 forks source link

Feature request: support portPos #12

Open punkeel opened 1 year ago

punkeel commented 1 year ago

Hi!

As a user, I would like to request support for compass points in the src_port/tailport and dst_port/headport properties of arrows in graphviz. This would allow me to specify which side of a node an arrow should originate from or end at, without having to manually define ports.

Doc for the portPos type.

Example:

digraph G {
  B -> A:sw;
}

Rendered: image

With a box shape:

digraph G {
    {
        a [shape=box]
        b [shape=box]
    }
  a:e -> b:nw;
}

image