Skip to content

ele.height()

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

eles.height — Collection › Position and dimensions

Preview · Collection › Position and dimensions

Read in the complete API reference · All API members

// Read the first element's height in model pixels: a node's content height, excluding padding and border, or an edge's stroke width
ele.height(): number | undefined

Read the first element's height in model pixels: a node's content height, excluding padding and border, or an edge's stroke width. A compound parent's height is derived from its children. The read reflects the current value during size animations.

Returns number | undefined

the height, or undefined when empty or removed

Example

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

Example graph and handle setup