The `'manhattan'` router is the smart version of the `'orthogonal'` router. It connects vertices with orthogonal line segments, inserting route points when necessary, while avoiding obstacles in its way. The router has useful options that determine how the algorithm behaves. These options can be passed as the `router.args` property:

step | number | Size of the imaginary grid followed by the `'manhattan'` pathfinding algorithm. Also the size of padding applied around start/end elements and obstacles. Lower number -> higher complexity. The `'manhattan'` router performs best when `step` has the same value as `dia.Paper.option.gridSize`. Default is `10`.
maximumLoops | number | The maximum number of iterations of the pathfinding loop. If the number of iterations exceeds this maximum, pathfinding is aborted and the fallback router (`'orthogonal'`) is used instead. Higher number -> higher complexity. Default is `2000`.
maxAllowedDirectionChange | number | Maximum change of direction of the `'manhattan'` route, in degrees. Default is `90`.
perpendicular | boolean | Should the `linkView.perpendicular` option be in effect? This causes the router not to link precisely to the anchor of the end element but rather to a point close by that is orthogonal. This creates a clean connection between the element and the first/last vertex of the route. Default is `true`.
excludeEnds | Array<string> | An array with strings `'source'` and/or `'target'` that tells the algorithm that the given end element(s) should not be considered as an obstacle. Default is `[]` (both are considered obstacles).
excludeTypes | Array<string> | An array of element types that should not be considered obstacles when calculating the route. Default is `['basic.Text']`.
startDirection | Array<string> | An array that specifies the possible starting directions from an element. Change this in situations where you need the link to, for example, always start at the bottom of the source element (then, the value would be `['bottom']`). Default is `['left', 'right', 'top', 'bottom']` (all directions allowed).
endDirection | Array<string> | An array that specifies the possible ending directions to an element. Change this in situations where you need the link to, for example, always end at the bottom of the source element (then, the value would be `['bottom']`). Default is `['left', 'right', 'top', 'bottom']` (all directions allowed).

Example:

    link.router('manhattan', {
        excludeEnds: ['source'],
        excludeTypes: ['myNamespace.MyCommentElement'],
        startDirections: ['top'],
        endDirections: ['bottom']
    });