How to reload a chart in cytoscape.js?

Is there a function that resets the chart to the newly loaded state? I tried cy.reset (), but it just resets the zoom and pan, and not restores the virgin graph.

Is there also a way to recover all deleted items?

Thanks!

+4
source share
1 answer

The easiest way is to call cy.load () again with the same data and graph parameters.

You can track starting positions, etc. and use eles.positions () and eles.restore (), but that will be a bit more to keep track of everything.

+1
source

Source: https://habr.com/ru/post/1498497/


All Articles