Skip to content

hasFreeEndpoint

since v1.4.0

hasFreeEndpoint(edge, end?): boolean

Checks whether the given endpoint of an edge is free (not connected to a node). A free endpoint has an empty source or target, and its position is stored in sourcePosition or targetPosition.

When end is omitted, checks whether either endpoint is free.

Edge

The edge to check.

EdgeEnd

The endpoint to check, or none to check both.

boolean

true when the endpoint is free.