Orthogonal links avoiding the nodes

Hi,

     &nbs p;  When

i draw orthogonal links programatically between the nodes, the links
are not avoiding the nodes ( i had set

link.setOrthogonal(true);
link.setJumpsOver(true);
link.setAvoidsNodes(true);

i had overridden isavoidable() and getAvoidableReactangle()).

I had even invoked calculateStroke() after initializing the link as above.
But still it does not avoid nodes.

But again, if i drag the nodes on the document, the links are able to
avoid the nodes. The overriden method getAvoidableRectangle() is being
called.

Can anyone help me in this regard…

You probably need to make sure the link is part of the document before you call calculateStroke(). Otherwise the link won’t know what nodes to avoid.