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

Delete context menu on connection selection #390

Closed
tomasp1189 opened this issue Apr 12, 2022 · 4 comments
Closed

Delete context menu on connection selection #390

tomasp1189 opened this issue Apr 12, 2022 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@tomasp1189
Copy link

Hey @jerosoler !! First of all, thanks for the awesome library!

I was wondering if it is possible to include the Delete context menu for connections upon a connection selection. I have looked at the source code and the documentation and haven't found any options for this.

Thanks!

@jerosoler jerosoler assigned tomasp1189 and jerosoler and unassigned tomasp1189 Apr 12, 2022
@jerosoler jerosoler added the question Further information is requested label Apr 12, 2022
@jerosoler
Copy link
Owner

Second button on mouse, show contextmenu on connection.

image

@tomasp1189
Copy link
Author

@jerosoler Yeah! I noticed, but me and my team would like to show it everytime we select a connection to make it more intuitive for the users.

@jerosoler
Copy link
Owner

You can try this.

    editor.on("clickEnd", function(e) {
      if(e.target.classList[0] === "main-path") {
          editor.contextmenu(e);
      }
    });

Seen in this issue:

@tomasp1189
Copy link
Author

This worked!! Thanks, @jerosoler ! You are a rockstar!

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

No branches or pull requests

2 participants