react-flow-chart icon indicating copy to clipboard operation
react-flow-chart copied to clipboard

BUG: Links don't update when node size changes

Open phlickey opened this issue 6 years ago • 1 comments

When using custom node components with a variable width or height, the start and end points of links will not update when the node size changes.

The ports and the link start match up at first

The ports and the link start match up at first

But then go out of sync when the node size changes

But then go out of sync when the node size changes

Should the position props on ports update when the nodeSize changes? Where is their position initially set?

phlickey avatar Aug 20 '19 16:08 phlickey

These should update when node.size is updated, see:

https://github.com/MrBlenny/react-flow-chart/blob/d47bcbd2c65d53295b12174ee74b25f54c497a36/src/components/Port/Port.wrapper.tsx#L50

Pagebakers avatar Jan 09 '20 09:01 Pagebakers