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

157
Views
Vis.js Timeline incrustado en la aplicación que causa errores

Solo trato de recrear este ejemplo de agrupación: https://jsfiddle.net/api/post/library/pure/

 var now = moment().minutes(0).seconds(0).milliseconds(0); var itemCount = 60; // create a data set with groups var groups = new vis.DataSet(); groups.add([ { id: 1, content: "Lee", nestedGroups: [11, 12, 13], }, { id: 2, content: "invisible group", visible: false, }, { id: 3, content: "John", nestedGroups: [14], showNested: false, }, { id: 4, content: "Alson", }, ]); groups.add([ { id: 11, content: "cook", }, { id: 12, content: "shop", }, { id: 13, content: "clean house", }, { id: 14, content: "wash dishes", }, ]); // create a dataset with items var items = new vis.DataSet(); var groupIds = groups.getIds(); var types = ["box", "point", "range", "background"]; for (var i = 0; i < itemCount; i++) { var start = now.clone().add(Math.random() * 200, "hours"); var end = start.clone().add(2, "hours"); var randomGroupId = groupIds[Math.floor(Math.random() * groupIds.length)]; var type = types[Math.floor(4 * Math.random())]; items.add({ id: i, group: randomGroupId, content: "item " + i, start: start, end: end, type: type, }); } // create visualization var container = document.getElementById("visualization"); var options = { groupOrder: "content", // groupOrder can be a property name or a sorting function }; var timeline = new vis.Timeline(container, items, groups, options);

Sin embargo, lo incorporo en mi propia aplicación que tiene, entre otras cosas, una estructura de menú (usando alternar y colapsar). Mi tiempo Vis funciona en su mayor parte sin ningún problema, pero alternar los grupos da un comportamiento extraño. Los grupos están desapareciendo y los subgrupos no se muestran.

Supongo que esto se debe a una confusión desencadenante de eventos.

¿Hay alguna manera de aislar los eventos vis.js de mi aplicación de alojamiento? Nunca había experimentado algo así antes, así que no tengo ni idea de cómo resolverlo.

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!