warelab / sciapps

SciApps: a cloud-based platform for reproducible bioinformatics workflows
https://www.sciapps.org
Apache License 2.0
2 stars 1 forks source link

Dynamic diagram size #67

Closed liyawang closed 6 years ago

liyawang commented 7 years ago

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.

liyawang commented 7 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).

liyawang commented 6 years ago

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

liyawang commented 6 years ago

Done