Closed jonng1000 closed 2 years ago
Hi, how do I trigger context menus only for nodes?
I did:
cy.on('tap', 'node', function (evt) { evt.target.contextMenus() /* evt.target.popper({ content: () => { let div = document.createElement("div"); div.innerHTML = "Popper content"; document.body.appendChild(div); return div; }, popper: {} // my popper options here }); */
But had a TypeError: evt.target.contextMenus is not a function
TypeError: evt.target.contextMenus is not a function
Could I get detailed instructions on how to trigger this for only nodes please? If Iuse the popper code above, it seems to work.
Thank you Jonathan
Oh, and I also want to display node attributes in the menu. Thanks =)
A request for help or a request for a how-to should be directed to Stack Overflow: http://stackoverflow.com/questions/tagged/cytoscape.js
Hi, how do I trigger context menus only for nodes?
I did:
But had a
TypeError: evt.target.contextMenus is not a function
Could I get detailed instructions on how to trigger this for only nodes please? If Iuse the popper code above, it seems to work.
Thank you Jonathan