UWB-Biocomputing / WorkBench

Software and data provenance management platform for simulations of dissociated cortical cultures.
https://uwb-biocomputing.github.io/WorkBench/
Apache License 2.0
1 stars 3 forks source link

Nodes should automatically stop spacing out in ProVis #95

Open king-shak opened 3 years ago

king-shak commented 3 years ago

Current Behavior

Currently, when you load a provenance file in a ProVis tab the nodes space out but they don't stop automatically. Rather, you need to manually stop them using the "Stop Vertices" switch. There are a couple issues that stem from this.

If you have detached nodes or detached groups of nodes, and you don't press "Stop Vertices" once they've spaced out, they will drift away from each other (explained later) and out of sight, requiring you to chase after them. Even a single node or a connected graph will drift.

This setup also makes it confusing to open a diff between two nodes, which requires dragging one node to another. If you don't select "Stop Vertices" before dragging, the node you're dragging towards runs away (trying to space itself out). If you select "Stop Vertices" you can drag one on top of another, but once you've closed the diff, they're left sitting on top of each other, and to space them back out, you must unselect "Stop Vertices", selecting it again once they've spaced out.

Expected Behavior

Upon loading a provenance file, the force directed graph algorithm will run until everything is spaced out. It must determine by itself when the nodes are spaced out and stop.

From then on, whenever the user interacts with the nodes (by dragging them) the algorithm should be stopped so they don't have to chase other nodes, and when they're done (once the node being dragged is released), the algorithm should run again to space everything back out, stopping automatically.

Of course, all of this means the "Stop Vertices" toggle will be removed.

Jupyter Notebook

I made a Jupyter Notebook here containing a force directed graph implementation just like the one used by ProVis. It sets up a bunch of nodes in random locations, creating edges to form multiple groups of them and links the groups together. It then runs the force directed graph algorithm to space everything out (the simulation portion). Doing this allowed me to

At the end of the notebook is a Discussion covering most of the things mentioned here and my discoveries in finding a method to automatically detect when the nodes have been spaced out - that bit in partiuclar you should look at if you are trying to solve this issue. It also goes over how to find the right set of constants.

stiber commented 3 years ago

I think this is an example of a well-documented issue that contains information that should probably be captured as part of the permanent documentation for Workbench. Good job!