ELK Layered algorithm with SvelteFlow

195 Views Asked by At

I'm using Elkjs and SvelteFlow to layout nodes inside a subflow as the one shown in the screenshot (left). I have tried many of properties for the ELK Layered algorithm (https://eclipse.dev/elk/reference/algorithms/org-eclipse-elk-layered.html), without success to achieve the output shown in right side of the screenshot. I basically want to vertically center Node 1. Any suggestion what algorithm or Layered property can allow me to achieve that. Thanks in advance!

enter image description here

1

There are 1 best solutions below

0
On

A simple solution to this would be to use a different algorithm. The desired layout can be achieved using the Mr.Tree Algorithm: https://eclipse.dev/elk/reference/algorithms/org-eclipse-elk-mrtree.html