Skip to content

cy.height()

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

cy.height — 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 height in CSS px
cy.height(): number

The rendered height in CSS px. Headless instances report the configured headlessHeight (default 600).

Returns number

the viewport height in CSS px

Example

console.log(cy.height()); // 600

Example graph and handle setup