Skip to content

API reference

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

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

#cy.minZoom()

// Get the minimum zoom, or set it
cy.minZoom(): number

Get the minimum zoom, or set it. Setting re-clamps the current zoom.

Returns number

the current minZoom value

Example

console.log(cy.minZoom()); // 1e-50

Example graph and handle setup

#cy.minZoom(zoom)

// Get the minimum zoom, or set it
cy.minZoom(zoom: number): this

Get the minimum zoom, or set it. Setting re-clamps the current zoom.

Parameters
NameDescription
zoom: number

the new minimum

Returns this

this core, for chaining

Example

const result = cy.minZoom(1e-50);
console.log(result === cy); // true

Example graph and handle setup