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

How to connect the tail end of a connection to another element? #80

Open
IamFonky opened this issue Jun 14, 2022 · 5 comments
Open

How to connect the tail end of a connection to another element? #80

IamFonky opened this issue Jun 14, 2022 · 5 comments

Comments

@IamFonky
Copy link

I'm trying to make a state machine and I am looking at the example here from jsplumb website.

First I noticed that you cannot move a connection if you take it from the tail. Even worse, you destroy it.
JSPlumb1

Then I found out that you can move them if you drop it on the source element.
JSPlumb2

Is there any way to make a connection by dropping the tail of the connection on the target element?

Here is a simplified codesandbox of what I am doing

@sporritt
Copy link
Member

You can do this with a "redrop policy". The docs for these were a bit lacklustre (read: missing) so I've updated them:

https://docs.jsplumbtoolkit.com/community/lib/connectivity#redrop-policies

In this case you probably want REDROP_POLICY_ANY or perhaps REDROP_POLICY_ANY_SOURCE on the source selector.

@IamFonky
Copy link
Author

IamFonky commented Jun 15, 2022

Thank you for your answer but I have now another problem (sorry for bother you by the way).
I can connect the end of any connector to any elements. The only problem now is that the enpoint dot is staying in the air with a fix position.

JSPlumb3
Sandbox

Also, do you know how to avoid having the starting point and the end point at the same position for a loop connection?

@sporritt
Copy link
Member

sporritt commented Jul 9, 2022

hmm this looks like it could be a bug.

@sporritt
Copy link
Member

sporritt commented Jul 9, 2022

..it seems to be the specific case that a connector becomes a self loop. that's the target endpoint still visible; it should have been hidden.

@sporritt
Copy link
Member

sporritt commented Jul 9, 2022

and in answer to your question about separate start/end points for loop, that's not currently supported.

@sporritt sporritt transferred this issue from jsplumb/jsplumb Oct 17, 2023
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

2 participants