Skip to content

frontend-web-editor


Function: GetEdgeParams() ​

GetEdgeParams(source, target): object

Defined in: utils/bayesianNodeIntersectionCalculator.ts:87

Computes the parameters needed for drawing an edge between two nodes, including the intersection points and positions on the nodes' edges.

Parameters ​

source ​

Node

The source node from which the edge is drawn.

target ​

Node

The target node to which the edge is drawn.

Returns ​

object

An object containing the intersection points and positions for both the source and target nodes if intersection points are found, otherwise null.

sourcePos ​

sourcePos: Position

sx ​

sx: number

sy ​

sy: number

targetPos ​

targetPos: Position

tx ​

tx: number

ty ​

ty: number

Remarks ​

This function uses GetNodeIntersection to find the points where an edge should intersect the source and target nodes' boundaries and uses GetEdgePosition to determine the positions on the nodes' edges where the edge should connect.