eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
239 stars 82 forks source link

Feature: Preserve port placement options for hierarchical ports. #1030

Open soerendomroes opened 2 months ago

soerendomroes commented 2 months ago

See https://github.com/eclipse/elk/issues/1029 and https://github.com/eclipse/elk/issues/1014 for examples.

When introducing a hierarchical port, the port placement is overridden since it would interfere with whatever the inner graph thinks how layout of the graph, which includes the ports as FIRST_SEPARATE and LAST_SEPARATE nodes, should look like.

I would like an option that tries to preserve, e.g., the justified, port placement instead. This would require some kind of partial position constraints that have to be integrated in one of the existing node placement to avoid ONO layouts. I guess this is not that trivial and requires knowledge how and when positions of ports and nodes are set and whether we can just post-process the node placement step to change the concrete positions. Currently, I think that post-processing after node placement should be possible.