How to make a link straight?

My link routing is AvoidsNodes. I want the link will be straight line after i drag the mouse from any port and drag it forward direction.when i will drag my mouse pointer any other direction,that time only the link will change its direction

Now, my link is coming like this.

I want this a straight line with out normal routing.

AvoidsNodes routing is always orthogonal – all segments are either horizontal or vertical.

can i write customRouting class??

Sure, there are several example subclasses inheriting from go.Link throughout the samples and extensions, overriding methods that get called as part of Link.computePoints