Skip to content

ele.paddedHeight()

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

eles.paddedHeight — Collection › Position and dimensions

Preview · Collection › Position and dimensions

Read in the complete API reference · All API members

// The drawn box height: content height plus twice the padding
ele.paddedHeight(): number | undefined

The drawn box height: content height plus twice the padding. Identical to height() for leaves, which have no padding.

Returns number | undefined

the padded height, or undefined when empty or removed

Example

console.log(eles.paddedHeight()); // 30

Example graph and handle setup