-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Ask your questions
We are building the graph of workflow where user defines the steps to do. I am using layer algorithm and TOP-DOWN direction.
I have custom nodes such as Approve node. This Approve node has three branches: reject, timeout, approve, therefore Approve node has three edges to the next nodes. Those nodes have connection to the next nodes and can even contain another Approve node that again has 3 branches. Three branches at the end finishing into the CLOSE node meaning the end of Approve node functionality. Reject branch is always on the left, timeout on the middle, approve on the right. When I add some node inside reject/approve branch the graph balances but the CLOSE node shifts to opposite direction, however, I wanted it to be centered and aligned with Approve node.
On the screenshot you can see that CLOSE node is shifted to the right for the Approve and to the left for the Approve5.
The pluses (+) are placeholder nodes, so they are kind of nodes.
These are layout options:
const layoutOptions = {
algorithm: 'layered',
'elk.direction': 'DOWN',
'org.eclipse.elk.layered.crossingMinimization.semiInteractive': 'true',
'org.eclipse.elk.spacing.nodeNode': '300',
'org.eclipse.elk.layered.mergeEdges': 'true',
'org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers': '40',
'org.eclipse.elk.layered.layering.strategy': 'INTERACTIVE',
'org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment': 'BALANCED'
}.
I've noticed that the graph handles in general balancing good, but when I add to reject (left) branch some node, graph balances and display it like I add on the middle (timeout) branch which is not correct and important for us. We want to keep on the left (reject) branch as it should be. Timeout/middle branch should be vertical line.
Generally it should be like this:
We are desperate to fix it and it is really important for us. 😒
Expected behavior
Left and right branches are on the same space from center, middle branch as a vertical line, close node on the center as root node
(Optional) ELK Version
0.10.0
(Optional) Additional context
we are using it with combination of reactflow 11.11.4