Closed liyawang closed 6 years ago
This needs to be further improved to use depth instead of steps. We will calculate depths for each step then take the max. The depth can be derived from the nextstep table. e.g. (A, B), the depth of B will be the depth of A plus one or a bigger number if there are also (A, C) and (C, B).
The major technical issue is that the mermaid diagram size is very small when coupled with dynamic size modal: https://github.com/reactjs/react-modal/issues/62
Done
Could use jobCount (workflowBuilderForm.js) to change diagram width (workflowDiagram.js).
e.g., 2, 700px 3, 920px 4, 1150px 5, 1350px 6, 99vw ...
However, this won't be ideal if some nodes are not connected from left to right. But, generally it will avoid creating a large diagram with very few nodes.
Also the width has to be defined in CSS to work.