Skip to content

ele.controlPoints()

eles.controlPoints — Collection > Edge points. Cytoscape.js signatures, parameters and return contract.

eles.controlPoints — Collection › Edge points

Preview · Collection › Edge points

Read in the complete API reference · All API members

// The edge's curve control points (model coords): one for a bundled bezier, two for a self-loop, the control list for an unbundled bezier, undefined otherwise (segments/taxi answer segmentPoints() instead)
ele.controlPoints(): Position[] | undefined

The edge's curve control points (model coords): one for a bundled bezier, two for a self-loop, the control list for an unbundled bezier, undefined otherwise (segments/taxi answer segmentPoints() instead).

Returns Position[] | undefined

the control points in model space, or undefined when the edge has none — which covers straight edges, segments/taxi routes, and a straight edge carrying manual endpoints (the 12c n = 0 chord)

Example

// Straight edges have no intermediate control points.
console.log(cy.getElementById('ab').controlPoints()); // undefined

Example graph and handle setup