Skip to content

eles.edgesTo(others)

eles.edgesTo — Collection > Traversing > Edge relations. Cytoscape.js signatures, parameters and return contract.

eles.edgesTo — Collection › Traversing › Edge relations

Preview · Collection › Traversing › Edge relations

Read in the complete API reference · All API members

// The edges running from this collection's nodes to others — edgesWith() restricted by direction
eles.edgesTo(others: Collection): Collection<NodeData, EdgeData, EdgeData>

The edges running from this collection's nodes to others — edgesWith() restricted by direction.

Parameters
NameDescription
others: Collection

the target-side nodes

Returns Collection<NodeData, EdgeData, EdgeData>

the directed connecting edges

Example

const other = cy.getElementById('b');
console.log(cy.getElementById('a').edgesTo(other).map(ele => ele.id())); // ["ab"]

Example graph and handle setup