// Scale each compound parent’s descendants into a miniature around the parent’s current centre
eles.collapse(timing?: Pick<AnimateOptions, 'duration' | 'easing'>): thisScale each compound parent’s descendants into a miniature around the parent’s current centre. Pass { duration, easing } to animate the scale; without options, the operation is immediate. The original nodes, edges and explicit visibility state remain unchanged.
| Name | Description |
|---|---|
timing: Pick<AnimateOptions, 'duration' | 'easing'>? | optional animation duration and easing |
Returns
thisthis collection, for chaining
Example
const parent = cy.add({ data: { id: 'parent' } });cy.getElementById('a').move({ parent: 'parent' });parent.collapse();console.log(parent.collapsed()); // true