// The scope's connected components over nodeSlots() ( factored out of packComponents for layouts that pack their own arrays): union-find over the scope's own edges — an edge with an endpoint outside the scope connects nothing here — indexed by position in nodeSlots()
ctx.components(): ComponentsThe scope's connected components over nodeSlots() (* factored out of packComponents for layouts that pack their own arrays): union-find over the scope's own edges — an edge with an endpoint outside the scope connects nothing here — indexed by position in nodeSlots().
Returns
Componentsthe component assignment, ids in first-seen node order
Example
cy.layout({ impl: { run(ctx) { console.log(ctx.components().count); // 1} } }).run();