The 'orthogonal' router returns a route with orthogonal line segments. It generates extra route points in order to create the right angles on the way. It does not avoid obstacles. The router has one optional argument; this can be passed as the router.args.elementPadding property:

elementPadding number The minimum distance from element at which the first/last route angle may be placed. Default is 20.

Example:

link.router('orthogonal', {
    elementPadding: 10
});

(Deprecated) For the purposes of backwards compatibility, the 'orthogonal' router can also be enabled by setting the link.manhattan property to true. Note that the meaning of manhattan in JointJS has changed over time.

// deprecated
link.set('manhattan', true);