The 'oneSide' router is a restricted version of the 'orthogonal' router. Exactly three route segments are generated. The route leaves the start element in a specified direction (the args.side property), transitions with a single segment towards the end element, and then enters the end element from the specified direction again. Note that this router does not support link vertices. The router does not avoid obstacles. Two arguments are accepted, which can be passed within the router.args property.

side string The direction of the route. Either 'left', 'right', 'top' or 'bottom'. Default is 'bottom'.
padding number | object The minimum distance from element at which the first/last route angle may be placed. Default is 40. The util.normalizeSides function is used to understand the provided value. A single number is applied as padding to all sides of the elements. An object may be provided to specify values for left, top, right, bottom, horizontal and/or vertical sides. Only the side specified in the side argument is considered by the router (see above).


link.router('oneSide', {
    side: 'top',
    padding: 30