Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
¿Cómo creo menús contextuales para mostrar atributos de nodo en cytoscape.js?

Hola, estoy tratando de usar https://github.com/iVis-at-Bilkent/cytoscape.js-context-menus para crear menús contextuales en mis nodos, pero estoy atascado. Me gustaría mostrar los atributos de los nodos. A continuación se muestra mi código. ¿Podría obtener ayuda por favor?

 <CytoscapeComponent elements={props.elements} style={ { height: sizeHeight + 'px', cursor: my_cursor } } cy={cy => { cy.on('add', 'node', _evt => { cy.layout(layout).run() cy.fit() setCy(cy) }) cy.on('mouseover', 'node', (evt) => { changeCursor('pointer') //makePopper(evt.target) }); cy.on('mouseout', 'node', (evt) => { changeCursor('default') var options = { // Customize event to bring up the context menu // Possible options https://js.cytoscape.org/#events/user-input-device-events evtType: 'tap', // List of initial menu items // A menu item must have either onClickFunction or submenu or both menuItems: [ { content: 'test', selector: 'node', onClickFunction: function (evt) { console.log(evt.target.data('123'))// The function to be executed on click //console.log('remove element'); }, show: false }, { id: 'test', content: 'test1', selector: 'node', coreAsWell: false, show: true, onClickFunction: function (evt) { console.log('test')// The function to be executed on click //console.log('remove element'); }, } cy.contextMenus(options); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!