@sagar wrote:
Hi,
I am using a linking tool to create a new link between nodes. I used the following link for inspiration - https://gojs.net/latest/api/symbols/linkingTool.html.
I am drawing a link from the adornment in my node. I have two adornments on the node and would like to name the link same as the adornment from which link is drawn.
var drawLink = function (e, obj) { var node = obj.part.adornedPart; var tool = e.diagram.toolManager.linkingTool; var name = obj.name; // name here holds the name of the adornment. Now all I need is to, display it as the "text" on the link. tool.startObject = node.port; e.diagram.currentTool = tool; tool.doActivate(); };
The are many nodes, and I cannot use from, to and text as described in the link - https://gojs.net/latest/intro/linklabels.html
Please let me know how this can be achieved.
Posts: 6
Participants: 2