bpmn-io / bpmn-auto-layout

Layout BPMN diagrams, generating missing DI information.
https://bpmn-io.github.io/bpmn-auto-layout/
52 stars 41 forks source link

Gateway position unexpected layout #67

Closed abdul99ahad closed 2 months ago

abdul99ahad commented 2 months ago

Describe the Bug

Sorting the elements to postpone laying out the gateways works in some cases but here's another case where it leads to new unexpected behavior:

image

The gateway is postponed so it's laid out only once all elements on the bottom have been laid out.

Even worse in this case (but was also bad before):

image

Steps to Reproduce

  1. do this
  2. do that
  3. now this happens

Expected Behavior

The model should adapt some different strategy to model gateways and elements as we can't rely on sorting for every scenario.

Environment