This is an example implementation for floating edges. The source and target position of the edges are getting calculated dynamically. You can find the implementation details in the utils.js file.
import { Position, MarkerType } from '@xyflow/react';// this helper function returns the intersection point// of the line between the center of the intersectionNode and the target nodefunction getNodeIntersection(intersectionNode, targetNode) { // https://math.stackexchange.com/questions/1724792/an-algorithm-for-finding-the-intersection-point-between-a-center-of-vision-and-a const { width: intersectionNodeWidth, height: intersectionNodeHeight } = intersectionNode.measured; const