0

I'm trying to add a right click event on the nodes, but it looks like the framework isn't capturing these events. This event is only fired when I left click:

cy.on('mousedown', (event, node) => {         
    console.log(event.originalEvent);
});

From the original event we could filter on the button we are interested in?

4
  • 1
    What is your exact question? If you want to add a right click event on nodes, you can use cy.on('cxttap', "node", function(event) { }); Mar 6, 2020 at 13:49
  • the questios wasn't more complicated ;-) worked , thanks
    – ic3
    Mar 6, 2020 at 14:43
  • it was a rfa :-(
    – ic3
    Mar 6, 2020 at 14:51
  • Please post your answer below and accept it yourself, that way others get the answer more easily :) Thanks
    – Stephan T.
    Mar 9, 2020 at 7:16

1 Answer 1

3

If you want to add a right click event on nodes, you can use

cy.on('cxttap', "node", function(event) { });

1
  • that's a bit like cheating the answer ;-)
    – ic3
    Mar 9, 2020 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.