hi
i use flowchart of gojs and i want when i click on link get from and to node and show in textbox?
i tried some way but i cant find anythings
anyone can help me i really need that
GoJS Events -- Northwoods Software talks about different kinds of events and how to implement handlers for them.
thanks but i need that :
myDiagram.model = new go.GraphLinksModel(
[
{ key: "Alpha", color: "lightblue" },
{ key: "Delta", color: "pink" }
],
[
{ from: "Alpha", to: "Alpha" },
{ from: "Delta", to: "Alpha" }
]);
when i click on link get from
{ from: "Delta", to: "Alpha" }
show from: “Delta” in 1 text box
and to: “Alpha” in other text box
Yes, you can do that by either implementing a click event handler on the Link or a “ObjectSingleClicked” or “ChangedSelection” DiagramEvent listener. There are many examples of this, including at the link I just gave you, but also throughout the documentation and the samples.
Once you have a reference to the clicked or selected Link, link.data.from
and link.data.to
give you the strings that you want to put into your HTML text boxes or whatever elements you have set up in your page.