Skip to content

ctx.edgeSlots()

ctx.edgeSlots — Extensions > Layout context > Columnar reads. Cytoscape.js signatures, parameters and return contract.

ctx.edgeSlots — Extensions › Layout context › Columnar reads

Preview · Extensions › Layout context › Columnar reads

Read in the complete API reference · All API members

// The scope's edge slots
ctx.edgeSlots(): number[]

The scope's edge slots.

Returns number[]

every live edge of the scope in cy.edges() order, with no filtering — the counterpart of nodeSlots(), which does filter

Example

// Inside a custom layout, ctx is supplied by the library.
cy.layout({ impl: { run(ctx) {
console.log(ctx.edgeSlots()); // [0, 1]
} } }).run();

Example graph and handle setup