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

right-click events #296

Closed
sheymann opened this issue Jun 12, 2014 · 4 comments · Fixed by #306
Closed

right-click events #296

sheymann opened this issue Jun 12, 2014 · 4 comments · Fixed by #306

Comments

@sheymann
Copy link
Contributor

Hello,

Do you consider adding the events:
rightClick
rightClickStage
rightClickNode
rightClickNodes

?

It's useful to display a popup or a context menu without impacting the browsing activity in the graph.

@apitts
Copy link
Contributor

apitts commented Apr 16, 2015

Wondering if anyone has been able to get righClick events working on Chrome? They are working fine for me in Firefox but not at all in Chrome. I suspect it may be the Chrome contextMenu but have disabled that and still no luck.

@apitts
Copy link
Contributor

apitts commented Apr 16, 2015

It's very hacky and I would much prefer to use the sigma events but this seems to be working for the moment.

    if (document.addEventListener) {
        document.addEventListener('contextmenu', function(e) {
          //my custom functionality on right click
            e.preventDefault();
        }, false);
    } else {
        document.attachEvent('oncontextmenu', function() {
            //my custom functionality on right click
            window.event.returnValue = false;
        });
    };

@sheymann
Copy link
Contributor Author

@apitts no issue with it, see how I've done in sigma.plugins.tooltips

@apitts
Copy link
Contributor

apitts commented Apr 16, 2015

@sheymann Thanks for that! Good to know it's just my issue as it narrows it down a lot. I see how you have removed the contextmenu in the tooltips plugin. The only thing I can think of at the moment is it might be something specific to Chrome on Ubuntu that's giving me the issue...I'll try testing it on Windows once I have access to a Windows machine. Definitely doesn't look like a sigma issue though.

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 a pull request may close this issue.

2 participants