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

fixed smoothStepEdge behaviour for sourceX > targetX case #1272

Merged
merged 1 commit into from Jun 23, 2021
Merged

fixed smoothStepEdge behaviour for sourceX > targetX case #1272

merged 1 commit into from Jun 23, 2021

Conversation

flamewow
Copy link

fixed smoothStepEdge behaviour for sourceX > targetX case

@moklick
Copy link
Member

moklick commented Jun 16, 2021

The current behaviour is intended. I think the current behaviour makes it clearer where the edge starts and ends.

your version:
Screenshot 2021-06-16 at 11 16 19
here it's not possible to see that the edge starts on the right side of the "Source 98" node.

current version:
Screenshot 2021-06-16 at 11 17 55

@flamewow
Copy link
Author

In a situation like:
image

where I have a source on the left and target on the right (B -> C) current smoothStepEdge implementation looks ugly.

How about if I add an additional check that the target is on the right and the source is on the left?
In that case, we won't break the current version and we still going to support the new version for the case I've described?

…on === Position.Right && targetPosition === Position.Left case
@moklick
Copy link
Member

moklick commented Jun 17, 2021

sounds good. I think the edge logic could benefit from a complete rewrite :D It's possible to write this way simpler and more generic.

@moklick moklick merged commit 6c834c8 into xyflow:main Jun 23, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants