Drag and expand functionality

Oct 2, 2008 at 11:53 AM
Hi all.
First I have to thanks for this nice app. I just hope you keep your great work.
Now the problems:
1. Drag: I'm able to drag a node in a graph, but am I able to automatically move the predecessor edges? From what I've seen this isn't supported so I started to do this by myself. I've subscribed the VertexMoved event and I'm trying to set the new location for the predecessor edges. But I can't find a way to know the old location of the Vertex I've just moved. Am I missing something? If it can be done can I make the set of the new position somehow smooth like with a drag animation?
2. Expand: The graphs I'm making are very large and are difficult to analyze. The graph is pretty much hierarchical, just like a tree, so I would like to now if it is possible to expand/contract a vertex with the predecessor vertex being shown/hidden?

José Tavares
Oct 2, 2008 at 4:30 PM

I assume you are using NetMapControl in your own application.

On the drag issue, dragging a vertex in the control automatically drags the edges incident to that vertex.  No programming is required to support this.  Is that not happening in your application?  Please clarify what you mean by moving the predecessor edges.

On the expand issue, the nifty functionality you describe isn't supported directly by NetMapControl, although you could probably implement it at the application level by monitoring the VertexClick event and modifying the graph's contents in response.  That's an excellent feature request, though.

I will be out of town for a few days and may not be able to answer additional questions until 10/6.

Thanks for your interest in our work!

-- Tony
Oct 2, 2008 at 4:54 PM
Edited Oct 2, 2008 at 5:01 PM
Hope I can still reach you...

Check these two images:
1. The graph as is rendered in the first place:

Graph with normal layout
2. After dragging the vertex in the middle all the vertices that are connected to it are in the same place.

Graph after draging
Sorry in the first post I meant successors and not predecessors (it's a directed graph)
What I wanted was that the vertices around the vertex were redrawn around the new position.
Edit: I forgot to mention I was using PerVertexWithLabelDrawer and PerEdgeWithLabelDrawer.

About the expand issue I was already looking into it. It was nice if the vertex could be simply shown/hidden instead of added/removed, but I'll work on it.

Oct 2, 2008 at 5:37 PM
Now I understand. No, I'm afraid we don't support that. You would have to do some clever programming with the API or modify the source code yourself to get such behavior.
-- Tony