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

Is it possible to disable the right click (contextmenu) #203

Closed
spapas opened this issue Jul 8, 2021 · 2 comments
Closed

Is it possible to disable the right click (contextmenu) #203

spapas opened this issue Jul 8, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@spapas
Copy link

spapas commented Jul 8, 2021

Hello, first of all thank you for this great project!

Second, is there a way to configure drawflow to not display the close button on right click on a node? I just want to display the normal browser right button context menu.

Thank you very much and kind regards,
Serafeim

@jerosoler jerosoler self-assigned this Jul 8, 2021
@jerosoler jerosoler added the question Further information is requested label Jul 8, 2021
@jerosoler
Copy link
Owner

Hello @spapas

Thanks!

For view normal context menu and not display close button.

   editor.contextmenu = (e) => {
            editor.drag = false;
            editor.drag_point = false;
            editor.connection = false;
            editor.ele_selected = null;
            editor.editor_selected = false;
            editor.dispatch('contextmenu', e);      
          }

          editor.start();

Add code before start.

View other options: #80 #47 #187

@spapas
Copy link
Author

spapas commented Jul 8, 2021

Thank you so much for the quick and perfect solution and the recommendations! I am greateful!

Kind regards,
Serafeim

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