Dash Cytoscape: How to automatically reapply layout on drag?

I have spent a few hours going through the docs, google and experimenting, but I could not find out how to accomplish something that I though would be pretty straightforward:
When a user drags a node, surrounding nodes should move as well in the spirit of the underlying layout.

Here is an example:


Click on any node, drag it around and watch. (I would probably not want the nodes to spring back to their original position after mouseup but that is a secondary concern)

I find that kind of behaviour to be crucial for a good user experience with large and densely connected graphs with labels, where users would want to “untangle” certain parts of the graph in order to examine them more closely.

Is that something that can be done at all with dash-cytoscape?

1 Like

I am currently searching for catching a drag event on a node.

Did you come further with your search?

I have a graph that is represented as a nested dict.
I finally came to the solution to catch the selectedNodeData on tapping a node.
Then, I determined the subgraph of the selected node.

Each of the nodes can then be selected, by setting the “selected” key to true.
After this, you can drag the selection around.

It is sad that there is no better solution for this implemented in this module :confused: