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

296
Views
Cómo hacer un bucle de la animación de borde a la hormiga en marcha en cytoscape.js

¿Cómo hago que el borde se anime como en una hormiga que marcha y lo apunto hacia el nodo de destino?

Intenté usar la propiedad line-dash-offset esta manera, pero no se repite.

estilo

 { selector: "edge", style: { "curve-style": "taxi", width: 2, "target-arrow-shape": "triangle", "target-arrow-color": "#9dbaea", "line-style": "dashed", "line-dash-pattern": [8, 4], } }

animación

 let loopAnimation = eles => { eles.animation( { style: { "line-dash-offset": 24, "line-dash-pattern": [8, 4], } }, { duration: 1000 } ).play().promise('complete').then(() => loopAnimation(eles)) }; cy.edges().forEach(loopAnimation);

diagrama

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Pude resolver esto llamando a reverse() antes de jugarlo

 let loopAnimation = eles => { const ani = eles.animation( { style: { "line-dash-offset": 24, "line-dash-pattern": [8, 4], } }, { duration: 1000 } ); ani.reverse().play().promise('complete').then(() => loopAnimation(eles)) };
about 4 years ago · Juan Pablo Isaza Report
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!