tisoap / react-flow-smart-edge

Custom Edge for React Flow that never intersects with other nodes
https://tisoap.github.io/react-flow-smart-edge/
MIT License
242 stars 26 forks source link

Edges not starting/ending on XY coords #48

Closed AlanJereb closed 1 year ago

AlanJereb commented 1 year ago

Describe the Bug

I would expect the edges to start and end on the provided XY coordinates, but they don't.

Used props:

    const getSmartEdgeReturn = getSmartEdge({
      sourceX: (maxX + defaultNodeWidth + minX) / 2,
      sourceY: (maxY + defaultNodeHeight + 20),
      sourcePosition: Position.Bottom,
      targetX: parentNode.position.x + defaultNodeWidth * 0.73,
      targetY: parentNode.position.y + defaultNodeHeight / 2,
      targetPosition: Position.Right,
      nodes: flowInstance.getNodes(),
      options: {
        nodePadding: defaultNodeWidth / 4,
        drawEdge: svgDrawStraightLinePath,
        generatePath: pathfindingJumpPointNoDiagonal,
      }
    });

Minimal Example

/

Steps to Reproduce the Bug or Issue

/

Expected behavior

Line should start and end on the provided coordinates.

Screenshots or Videos

Issue

Platform

Additional context

No response

tisoap commented 1 year ago

Closing due to lack of minimal example