Skip to content

@eightkk/vue-weave / core / GraphEdgeRouteOptions

Interface: GraphEdgeRouteOptions ​

Defined in: src/core/graphRouting.ts:24

Properties ​

avoidNodes? ​

optional avoidNodes?: boolean | GraphObstacleAvoidance

Defined in: src/core/graphRouting.ts:52

Opt-in: orthogonal edges without waypoints go around the node boxes, true for the defaults or the settings (see findOrthogonalRoute). Every box of the layout is an obstacle, collapsed-group proxies included. An edge that has no route around the boxes keeps the plain orthogonal route. Default undefined: routes do not avoid boxes.


cache? ​

optional cache?: GraphRouteCache

Defined in: src/core/graphRouting.ts:60

Opt-in memo from createGraphRouteCache. A call with a cache reuses the route of every edge whose inputs are the same as in the previous call with that cache: the edge, its end nodes' shapes and ports, its end boxes, its path and label in layout, its parallel slot and the options, and with avoidNodes every box and box edge the obstacle search read. The result is the same as without a cache; only the work differs. Use one cache per sequence of related layouts, such as one view's layout after each edit. Default undefined: every edge is routed.


cornerRadius? ​

optional cornerRadius?: number

Defined in: src/core/graphRouting.ts:33

Radius of the rounded corners of orthogonal routes, in chart units. Default 0 (sharp corners).


direction? ​

optional direction?: GraphLayoutDirection

Defined in: src/core/graphRouting.ts:31

Layout direction; picks the sides an orthogonal edge leaves and enters. Default 'LR'.


parallelSpacing? ​

optional parallelSpacing?: number

Defined in: src/core/graphRouting.ts:46

Opt-in distance, in chart units, between parallel edges: edges between the same two nodes (in either direction) that have no points and no named ports, and self-loops of one node without them. They are spread symmetrically around the line between the box centres, in every style; self-loops are nested. A single edge is not changed. Default undefined: parallel edges are drawn on top of each other.


policy? ​

optional policy?: GraphRoutingPolicy

Defined in: src/core/graphRouting.ts:39

Default 'builtin'. 'preserve' keeps every path the layout drew while it still fits its nodes and ports (see isGraphRouteValid), whatever the style, and routes only the other edges: edges with points, edges of moved or resized nodes, edges whose port changed, and edges the port routing redrew.


style? ​

optional style?: GraphEdgeStyle

Defined in: src/core/graphRouting.ts:29

Default 'curve': only edges with waypoints are rerouted, every other path is kept. An edge's own edgeStyle overrides it for that edge.

Released under the MIT License.