Skip to content

ele.renderedWidth()

eles.renderedWidth — Collection > Position and dimensions. Cytoscape.js signatures, parameters and return contract.

eles.renderedWidth — Collection › Position and dimensions

Preview · Collection › Position and dimensions

Read in the complete API reference · All API members

// width() scaled by the current zoom — the on-screen width in CSS px
ele.renderedWidth(): number | undefined

width() scaled by the current zoom — the on-screen width in CSS px.

Returns number | undefined

the rendered width, or undefined when empty or removed

Example

cy.zoom(2);
console.log(cy.getElementById('a').renderedWidth()); // 60

Example graph and handle setup