Skip to content

ele.paddedWidth()

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

eles.paddedWidth — Collection › Position and dimensions

Preview · Collection › Position and dimensions

Read in the complete API reference · All API members

// The drawn box: core dims + 2 x padding
ele.paddedWidth(): number | undefined

The drawn box: core dims + 2 x padding.

Returns number | undefined

the padded width — identical to width() for leaves, which have no padding; undefined when empty or removed

Example

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

Example graph and handle setup