Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in ConnectionLine when trying to change the source handle on an edge that has a target that is an output type node #1177

Closed
ImBaedin opened this issue May 6, 2021 · 5 comments
Assignees

Comments

@ImBaedin
Copy link

ImBaedin commented May 6, 2021

Example here: https://codesandbox.io/s/bold-breeze-nlg5s?file=/src/App.js

image

@ImBaedin
Copy link
Author

ImBaedin commented May 6, 2021

I think I may have found a lead. It seems that when you grab the source handle, the end of the connection line attaches to the source of the target node.

image

For this, all I did was click and drag the source of the line to the right a bit. You can see that the connection point is no longer the target, but the source. An output type node doesn't have a source though, so it's erroring out.

@sginn
Copy link

sginn commented May 27, 2021

I ran into this problem as well. The updatable-edge example reproduces the awkward positioning of a dragged edge, and if you change Node C to an "Output" node, you can recreate the crash

sourceNode.__rf.handleBounds[connectionHandleType] is null

If we change this line to the below, everything appears to work again:

const handleType = isTarget ? 'target' : 'source';

@moklick I was going to submit a PR for this change, but saw that change would likely regress #982

I'm not sure if there's an answer that gets us both issues...

@moklick
Copy link
Member

moklick commented May 28, 2021

I will take a look at this issue. Thanks for the input here!

@moklick moklick self-assigned this May 28, 2021
@moklick
Copy link
Member

moklick commented May 29, 2021

Could you try v9.5.5 ?

@sginn
Copy link

sginn commented May 29, 2021

This is great! Thanks for the really fast turnaround!
The upgrade fixed the issue for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants