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​
| Parameter | Type | Description |
|---|---|---|
options | LinkRoutingStraightOptions | overrides 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()} />