feat(floatingedge): configure connectionline

This commit is contained in:
Christopher Möller
2021-10-14 10:52:46 +02:00
parent b36c713650
commit ecc02a1ee9
4 changed files with 10 additions and 59 deletions
+8 -8
View File
@@ -131,25 +131,25 @@ const CustomEdge: FC<EdgeProps> = ({
};
export const ConnectionLine: FC<ConnectionLineComponentProps> = ({
sourceX,
sourceY,
targetX,
targetY,
sourcePosition,
targetPosition,
sourceNode,
}) => {
if (!sourceNode) {
return null;
}
const targetNode = { __rf: { width: 100, height: 100, position: { x: targetX, y: targetY - 50 } } };
const { sx, sy, tx, ty, label, sourcePos, targetPos } = getArrow(sourceNode, targetNode);
const targetNode = { __rf: { width: 1, height: 1, position: { x: targetX, y: targetY } } };
const { sx, sy } = getArrow(sourceNode, targetNode);
const d = getBezierPath({
sourceX: sx,
sourceY: sy,
sourcePosition: sourcePos,
targetPosition: targetPos,
targetX: tx,
targetY: ty,
sourcePosition,
targetPosition,
targetX,
targetY,
});
return (