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

Direction of link flow #108

Open
cmrts opened this issue Jan 11, 2021 · 0 comments
Open

Direction of link flow #108

cmrts opened this issue Jan 11, 2021 · 0 comments

Comments

@cmrts
Copy link

cmrts commented Jan 11, 2021

First of all....congratulations for the awesome library. I've seen a few, but this is the easiest and quickest to understand and work with. The examples are also very good! Well done.

Is your feature request related to a problem? Please describe.
The direction of the "information flow" animation I expected it would be from an output port of one node, to an input port of another. When connecting the nodes though, the schema object for the link shows that this is not the case (i.e. the link direction seems to flow from output to input instead). For example, in the customisation example https://beautifulinteractions.github.io/beautiful-react-diagrams/#/Customisation you will note that when you connect the ports, when you hover, the information goes from right to left, i.e. goes the opposite direction that I would expect.

Describe the solution you'd like
Inspecting the schema object, it seems that the input and output seem to be swapped when set? (that means that the input, output of the link should be the other way around or the CSS attributed to each case should we swapped around).

Describe alternatives you've considered
I've used a useEffect on schema.links to track the last added link and swapped the input/output in the schema object directly. This confirmed that the input/output stored in the schema must be the other way around. I could swap the CSS around, but I can't work it out (yet).

Additional context
nothing to add....other than well done again!

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

1 participant