Skip to content

useSelfLoopApexY

useSelfLoopApexY(source, target, sourceY): number

Y coordinate a self-loop peaks at: SELF_CONNECTING_EDGE_LABEL_OFFSET above the top edge of the source node, whatever the node height and wherever its ports sit. Falls back to the same offset above sourceY for a node React Flow has not placed yet, so the loop and its label always read one value. Subscribes to the React Flow store, so the loop follows the node as it moves or grows.

string

string

number

number