Hi, first post. I am trying to take my existing graph and add the following feature:
I want to be able to click and drag a node over another node and create a link between the two WITHOUT relocating any nodes, if that makes sense. One problem I am facing is on a double click of the node, a new node will be created so this click and drag functionality would need to be on a single click.
What sample are you referring to? Double click doesn’t have any default action… double click to create a new node is something some of our samples do. Check the sample code.
I’m not getting a clear idea of what you want this click-dragover-createlink action you want to work and how double click would be used there.
It sounds like the domain of a custom dragging tool.
I have implemented the functionality to create a new node on a double click.
I should have explained better. I have a flow chart like structure. Double clicking nodes creates a new node instance as well as creates a link between the two nodes and populates it on the Document.
What I have right now is, one node can only connect to one other node. I want to be able to have the user make a node connect to many nodes. I thought clicking and dragging could work by clicking the node, dragging it over another, and then creating a link this way. However, I thought that might create a lot of overhead so I thought about single clicking a node, and then creating a link on the NEXT item selected but I was having trouble implementing the next selected object.
I just want to be clear. If I have a graph with a Root and three children and from these children, each have their own children (grandchild to the Root). I want to be able to connect any of the grandchildren to any of the other Root’s children.
So if I have A – > B, C, D (where A is the root and B, C, D are the children)
B --> B1
C --> C1
D – > D1
I want the user to be able to create a link between D1 and B, if they choose.
I hope that’s clear, but I would appreciate any source material you could send.
Well, that doesn’t really work the way I want it to. I want to create a GoLink with arrows with my links. Plus, I want to be able able to save the link and clicking and dragging doesn’t give me that functionality. It gives immediate results, but not withstanding.