// Emphasize the given elements and dim the rest of the graph
cy.emphasize(eles: Collection): thisEmphasize the given elements and dim the rest of the graph. Use a node's neighbourhood to highlight a local part of the network.
Emphasized elements match { emphasized: true } in queries and style conditions. The rest are composited using the core's dim-opacity (default 0.15), while emphasized elements appear above them at full opacity. Dimming does not change individual element style values.
| Name | Description |
|---|---|
eles: Collection | the elements to emphasize, from this instance |
Returns
thisthis core, for chaining
Example
cy.emphasize(cy.getElementById('a').closedNeighborhood());console.log(cy.getElementById('b').emphasized()); // trueThrows
when eles is not a collection, or is one from another instance