Skip to content

ele.targetEndpoint()

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

eles.targetEndpoint — Collection › Edge points

Preview · Collection › Edge points

Read in the complete API reference · All API members

// Get the first edge's target arrow position in model coordinates
ele.targetEndpoint(): Position | undefined

Get the first edge's target arrow position in model coordinates. Straight edges meet the target node's boundary with the arrowhead's spacing applied. The line can end farther back to leave room for a hollow arrowhead.

Curved routes return the corresponding point along their computed geometry. Returns undefined when the first element is not an edge.

Returns Position | undefined

the endpoint, or undefined for non-edges

Example

const point = cy.getElementById('ab').targetEndpoint();
console.log(Number.isFinite(point.x)); // true

Example graph and handle setup