Skip to content
maxkfranz edited this page Jan 10, 2012 · 3 revisions

cy.reset()

Reset the graph to the default zoom level and panning position.

cy.reset()

Resets the graph to its default viewport state

Details

This resets the viewport to its state when Cytoscape Web was last loaded with cy.load() — that is, the default viewport state or origin of the graph.

Examples

cy.load( someGraphData ); // (1)
cy.pan( somePosition );
cy.zoom( someZoomLevel );
cy.reset(); // reset back to the viewport state at (1)

Clone this wiki locally