// Reset the viewport to zoom 1, pan (0, 0)
cy.reset(): thisReset the viewport to zoom 1, pan (0, 0).
Returns
thisExample
cy.pan({ x: 40, y: 20 });cy.zoom(2);cy.reset();cy.zoom(1);console.log(cy.zoom()); // 1cy.reset — Core > Viewport manipulation > Pan, zoom, fit and bounds. Cytoscape.js signatures, parameters and return contract.
cy.reset — Core › Viewport manipulation › Pan, zoom, fit and bounds
Preview · Core › Viewport manipulation › Pan, zoom, fit and bounds
Read in the complete API reference · All API members
// Reset the viewport to zoom 1, pan (0, 0)
cy.reset(): thisReset the viewport to zoom 1, pan (0, 0).
thisExample
cy.pan({ x: 40, y: 20 });cy.zoom(2);cy.reset();cy.zoom(1);console.log(cy.zoom()); // 1