Skip to content

cy.renderedExtent()

cy.renderedExtent — Core > Viewport manipulation > Pan, zoom, fit and bounds. Cytoscape.js signatures, parameters and return contract.

cy.renderedExtent — 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

// The rendered (on-screen) viewport rectangle
cy.renderedExtent(): Extent

The rendered (on-screen) viewport rectangle.

Returns Extent

the container's box in rendered px, anchored at the origin — the rendered-space counterpart of extent(), which is the same box projected into model coordinates

Example

console.log(cy.renderedExtent().w); // 800

Example graph and handle setup

See

Core#extent for the model-coordinate form