Skip to content

ele.effectiveOpacity()

eles.effectiveOpacity — Collection > Style. Cytoscape.js signatures, parameters and return contract.

eles.effectiveOpacity — Collection › Style

Preview · Collection › Style

Read in the complete API reference · All API members

// The rendered opacity: a node's own opacity times its ancestors' (the store keeps the folded value in the column); an edge's own opacity (edges have no parent)
ele.effectiveOpacity(): number | undefined

The rendered opacity: a node's own opacity times its ancestors' (the store keeps the folded value in the column); an edge's own opacity (edges have no parent).

Returns number | undefined

the opacity actually rendered, which is what transparent() tests against 0 — not the declared opacity style value, which style('opacity') reads; undefined when empty or removed

Example

console.log(eles.effectiveOpacity()); // 1

Example graph and handle setup