Skip to content

ele.segmentPoints()

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

eles.segmentPoints — Collection › Edge points

Preview · Collection › Edge points

Read in the complete API reference · All API members

// The edge's segment points (model coords): defined for segments and taxi edges (taxi derives its points), undefined otherwise
ele.segmentPoints(): Position[] | undefined

The edge's segment points (model coords): defined for segments and taxi edges (taxi derives its points), undefined otherwise.

Returns Position[] | undefined

the interior route points in model space — derived ones for taxi, which computes rather than declares them — or undefined for every other family

Example

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

Example graph and handle setup