i have a node as below
from which i can draw a link with name “Yes”. but when i draw one more link from the same node again will get the link with name “Yes” itself like below
. But when i draw more than one link from “if-else” i want the 2nd link to have name “No” automatically like below.
. please help me in this.
It’s probably easiest to implement a “LinkDrawn” DiagramEvent listener. The e.subject
will be the new Link, so e.subject.fromNode
will be the “from” or “source” Node. Let’s assume: var fromNode = e.subject.fromNode
.
You can then either count the number of Links coming out of that node, fromNode.findLinksOutOf().count
, or look at all of the labels on all of those Links, to decide how to set the label of the new Link.
Thank you for the solution…:)