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

257
Views
Quiero agregar un nodo dinámico con un borde en el renderizador de flujo de reacción. Puedo agregar un nodo dinámico pero no puedo conectar el borde de forma predeterminada

Puedo agregar un nodo dinámico, pero no puedo conectar el borde de forma predeterminada. Si agrego un nuevo nodo, necesito proporcionar el origen y el destino, ¿cómo proporciono el origen y el destino de un nodo dinámico?

 const initialNodes = [ { id: 'a', data: { label: 'Start' }, position: { x: 250, y: 25 }, style: { borderRadius: '50%', padding: '10px', color: 'white', backgroundColor: '#6ede87' } }, { id: 'z', data: { label: 'End' }, position: { x: 250, y: 700 }, style: { borderRadius: '50%', padding: '14px', color: 'white', backgroundColor: 'red' } }, ]; const initialEdges = [ { id: 'e1-2', source: edgeID, target: ++edgeID }, ] const [nodes, setNodes] = useState(initialNodes); const [edges, setEdges] = useState(initialEdges); //adding a new node : const newNode = { type:'selectorNode2', id, position: { x: Math.random() * 500, y: Math.random() * 500, }, data: { label: `${nameofNode}`, }, style: { background: typeofNode === 1 ? '#ff6700' : typeofNode === 2 ? '#ff0072' : typeofNode === 3 ? '#668de3' : '#fffff', color: '#ffff', border: '1px solid #222138', width: 180, borderRadius: typeofNode === 2 ? '50px' : '0px', }, }; 

ingrese la descripción de la imagen aquí

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!