Skip to main content
Version: 4.3

linkRoutingStraight()

function linkRoutingStraight(options?): LinkRouting;

Straight-line routing: links are drawn as a direct line from source to target, with no obstacle avoidance. The simplest, lowest-overhead routing.

Returns a LinkRouting bundle for the Paper linkRouting prop that sets the paper's router, connector, anchor, and connection point in one step. For other looks, reach for linkRoutingOrthogonal (right-angle segments that steer around elements) or linkRoutingSmooth (curved links).

Parameters

ParameterTypeDescription
optionsLinkRoutingStraightOptionsoverrides for corner style, anchor, and connection-point offsets

Returns

LinkRouting

Paper link defaults for straight routing

Example

import { Paper, linkRoutingStraight } from '@joint/react';

<Paper linkRouting={linkRoutingStraight()} />

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub